VCFilter.CanMove(Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns true
if the filter can be moved to the specified location.
public:
bool CanMove(System::Object ^ Parent);
public:
bool CanMove(Platform::Object ^ Parent);
bool CanMove(winrt::Windows::Foundation::IInspectable const & Parent);
[System.Runtime.InteropServices.DispId(2360)]
public bool CanMove (object Parent);
[<System.Runtime.InteropServices.DispId(2360)>]
abstract member CanMove : obj -> bool
Public Function CanMove (Parent As Object) As Boolean
Parameters
- Parent
- Object
Required. The folder or project into which you want to move the filter.
Returns
true
if the filter can be moved to the specified location; otherwise, false
.
- Attributes
Examples
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
Remarks
See How to: Compile Example Code for Project Model Extensibility for information about how to compile and run this example.