IToolboxUser.GetToolSupported メソッド
アセンブリ: System.Drawing (system.drawing.dll 内)

Dim instance As IToolboxUser Dim tool As ToolboxItem Dim returnValue As Boolean returnValue = instance.GetToolSupported(tool)
戻り値
ツールボックスでツールがサポートされていて有効にできる場合は true。ドキュメント デザイナでツールの使用方法が認識されない場合は false。

IToolboxUser を実装するデザイナで、指定したツールがサポートされている場合は、そのデザイナがフォーカスを取得したときに、そのツールがツールボックス内で有効になります。それ以外の場合、ツールは無効になります。ツールが有効または無効としてマークされた後は、同じデザイナでそのツールがサポートされているかどうかを再テストすることはできません。

GetToolSupported メソッドの実装例を次に示します。
' This method can signal whether to enable or disable the specified ' ToolboxItem when the component associated with this designer is selected. Function GetToolSupported(ByVal tool As ToolboxItem) As Boolean Implements IToolboxUser.GetToolSupported ' Search the blocked type names array for the type name of the tool ' for which support for is being tested. Return false to indicate the ' tool should be disabled when the associated component is selected. Dim i As Integer For i = 0 To blockedTypeNames.Length - 1 If tool.TypeName = blockedTypeNames(i) Then Return False End If Next i ' Return true to indicate support for the tool, if the type name of the ' tool is not located in the blockedTypeNames string array. Return True End Function
// This method can signal whether to enable or disable the specified // ToolboxItem when the component associated with this designer is selected. bool IToolboxUser.GetToolSupported(ToolboxItem tool) { // Search the blocked type names array for the type name of the tool // for which support for is being tested. Return false to indicate the // tool should be disabled when the associated component is selected. for( int i=0; i<blockedTypeNames.Length; i++ ) if( tool.TypeName == blockedTypeNames[i] ) return false; // Return true to indicate support for the tool, if the type name of the // tool is not located in the blockedTypeNames string array. return true; }

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からIToolboxUser.GetToolSupported メソッドを検索する場合は、下記のリンクをクリックしてください。

- IToolboxUser.GetToolSupported メソッドのページへのリンク