VCFilter::CanMove Method (Object^)

 

Returns true if the filter can be moved to the specified location.

Namespace:   Microsoft.VisualStudio.VCProjectEngine
Assembly:  Microsoft.VisualStudio.VCProjectEngine (in Microsoft.VisualStudio.VCProjectEngine.dll)

bool CanMove(
	Object^ Parent
)

Parameters

Parent
Type: System::Object^

Required. The folder or project into which you want to move the filter.

Return Value

Type: System::Boolean

true if the filter can be moved to the specified location; otherwise, false.

See How to: Compile Example Code for Project Model Extensibility for information about how to compile and run this example.

The following example uses CanMove in the integrated development environment (IDE):

' Macro code.
' add reference to Microsoft.VisualStudio.VCProjectEngine
Imports EnvDTE
Imports Microsoft.VisualStudio.VCProjectEngine

Public Module Module1
    Sub Test()
        Dim mycollection As IVCCollection
        Dim filter, filter2 As VCFilter
        Dim prj As VCProject
        Dim ret As Boolean
        prj = DTE.Solution.Projects.Item(1).Object
        mycollection = prj.Filters
        'mycollection.Count has count of files
        filter = mycollection.Item(1)
        filter2 = mycollection.Item(2)
        ret = filter.CanMove(filter2)
        MsgBox(ret)
    End Sub
End Module
Return to top
Show: