共用方式為


Support.GetDefault(Button) 方法

定義

警告

Microsoft.VisualBasic.Compatibility.* classes are obsolete and supported within 32 bit processes only. http://go.microsoft.com/fwlink/?linkid=160862

Gets 會設定一個值,決定某個控制項是否 Button 是表單上的預設按鈕。

public:
 static bool GetDefault(System::Windows::Forms::Button ^ btn);
public static bool GetDefault(System.Windows.Forms.Button btn);
[System.Obsolete("Microsoft.VisualBasic.Compatibility.* classes are obsolete and supported within 32 bit processes only. http://go.microsoft.com/fwlink/?linkid=160862")]
public static bool GetDefault(System.Windows.Forms.Button btn);
static member GetDefault : System.Windows.Forms.Button -> bool
[<System.Obsolete("Microsoft.VisualBasic.Compatibility.* classes are obsolete and supported within 32 bit processes only. http://go.microsoft.com/fwlink/?linkid=160862")>]
static member GetDefault : System.Windows.Forms.Button -> bool
Public Function GetDefault (btn As Button) As Boolean

參數

btn
Button

一個控制。Button

傳回

true 如果 btn 是預設按鈕;否則 false

屬性

備註

此函數等同於檢查 AcceptButtonForm性質。

備註

命名空間中的 Microsoft.VisualBasic.Compatibility.VB6 函式與物件提供給從 Visual Basic 6.0 升級到 Visual Basic 2008 的工具使用。 在大多數情況下,這些函式和物件會重複你在 .NET Framework 其他命名空間中能找到的功能。 只有當 Visual Basic 6.0 的程式碼模型與 .NET Framework 實作有顯著差異時,才需要使用。

適用於