مشاركة عبر


Button.Activate أسلوب

تنشيط Button.

مساحة الاسم:  Microsoft.Office.Tools.Word.Controls
التجميع:  Microsoft.Office.Tools.Word.v4.0.Utilities (في Microsoft.Office.Tools.Word.v4.0.Utilities.dll)

بناء الجملة

'إقرار
Public Sub Activate
public void Activate()

أمثلة

مثال التعليمة البرمجية التالية يضيف الثاني Buttonيتحكم بمستند وثم برمجياً تنشيط أول زر باستخدام Activateالأسلوب.

Th هو المثال هو لتخصيص المستوى مستند.

Private Sub ActivateControl()
    Dim Button1 As Microsoft.Office.Tools.Word.Controls.Button = _
        Me.Controls.AddButton(25, 25, 80, 30, "Button1")
    Button1.Text = "Button 1"

    Dim Button2 As Microsoft.Office.Tools.Word.Controls.Button = _
        Me.Controls.AddButton(25, 100, 80, 30, "Button2")
    Button2.Text = "Button 2"

    ' Programmatically activate the first button.
    Button1.Activate()
End Sub
private void ActivateControl()
{
    Microsoft.Office.Tools.Word.Controls.Button button1 =
        this.Controls.AddButton(25, 25, 80, 30, "button1");
    button1.Text = "Button 1";

    Microsoft.Office.Tools.Word.Controls.Button button2 =
        this.Controls.AddButton(25, 100, 80, 30, "button2");
    button2.Text = "Button 2";

    // Programmatically activate the first button.
    button1.Activate();
}

أمن NET Framework.

راجع أيضًَا

المرجع

Button الفئة

Button الأعضاء

Microsoft.Office.Tools.Word.Controls مساحة الاسم