Share via


InputPanel.EnabledChanged-Ereignis

Dieser Dokumentation für die Vorschau nur ist und in späteren Versionen geändert. Leere Themen wurden als Platzhalter eingefügt.]

Tritt auf, wenn (SIP) des soft input Panel aktiviert oder deaktiviert ist.

Namespace:  Microsoft.WindowsCE.Forms
Assembly:  Microsoft.WindowsCE.Forms (in Microsoft.WindowsCE.Forms.dll)

Syntax

'Declaration
Public Event EnabledChanged As EventHandler
'Usage
Dim instance As InputPanel
Dim handler As EventHandler

AddHandler instance.EnabledChanged, handler
public event EventHandler EnabledChanged
public:
 event EventHandler^ EnabledChanged {
    void add (EventHandler^ value);
    void remove (EventHandler^ value);
}
member EnabledChanged : IEvent<EventHandler,
    EventArgs>

Hinweise

Das EnabledChanged-Ereignis tritt ein, wenn das SIP aktiviert oder, entweder programmgesteuert oder durch den Benutzer deaktiviert.Beim Eintreten dieses Ereignisses können Sie bestimmen, ob das SIP aktiviert oder deaktiviert, und positionieren oder Größe der Steuerelemente entsprechend ändern.

Sie können dieses Ereignis auslösen, durch Ändern der Enabled-Eigenschaft.

Beispiele

Das folgenden Beispiel wird EnabledChanged-Ereignis verwendet, zum Verringern der Höhe eines Steuerelements Registerkarte, wenn das SIP aktiviert ist.Wenn das SIP deaktiviert ist, werden das Registerkarten-Steuerelement an seine ursprüngliche Höhe zurückgegeben.In diesem Beispiel ist Teil eines umfangreicheren Beispiels für die InputPanel Komponente bereitgestellt wird.

PrivateSub InputPanel1_EnabledChanged(ByVal sender AsObject, _
    ByVal e As System.EventArgs) Handles InputPanel1.EnabledChanged
 If InputPanel1.Enabled = FalseThen
  ' The SIP is disabled, so set the height of the tab control  ' to its original height with a variable (TabOriginalHeight),  ' which is determined during initialization of the form.
  VisibleRect = InputPanel1.VisibleDesktop
  TabControl1.Height = TabOriginalHeight
 Else  ' The SIP is enabled, so the height of the tab control  ' is set to the height of the visible desktop area.
  VisibleRect = InputPanel1.VisibleDesktop
  TabControl1.Height = VisibleRect.Height
 EndIf
 ' The Bounds property always returns a width of 240 and a height of 80 ' pixels for Pocket PCs, regardless of whether or not the SIP is enabled.
 BoundsRect = InputPanel1.Bounds

 ' Show the VisibleDesktop and Bounds values ' on the second tab for demonstration purposes.
       VisibleInfo.Text = String.Format("VisibleDesktop: X = {0}, " _
       & "Y = {1}, Width = {2}, Height = {3}", _
       VisibleRect.X, VisibleRect.Y, _
       VisibleRect.Width, VisibleRect.Height)
       BoundsInfo.Text = String.Format("Bounds: X = {0}, Y = {1}," _
          & "Width = {2}, Height = {3}", BoundsRect.X, BoundsRect.Y, _
          BoundsRect.Width, BoundsRect.Height)
EndSub
privatevoid inputPanel1_EnabledChanged(object sender, EventArgs e)
{
    if (inputPanel1.Enabled == false)
    {
        // The SIP is disabled, so set the height of the tab control// to its original height with a variable (TabOriginalHeight),// which is determined during initialization of the form.
        VisibleRect = inputPanel1.VisibleDesktop;
        tabControl1.Height = TabOriginalHeight;
    }
    else
    {
        // The SIP is enabled, so the height of the tab control// is set to the height of the visible desktop area.
        VisibleRect = inputPanel1.VisibleDesktop;
        tabControl1.Height = VisibleRect.Height;
    }

    // The Bounds property always returns a width of 240 and a height of 80// pixels for Pocket PCs, regardless of whether or not the SIP is enabled.
    BoundsRect = inputPanel1.Bounds;

    // Show the VisibleDestkop and Bounds values// on the second tab for demonstration purposes.
    VisibleInfo.Text = String.Format("VisibleDesktop: X = {0}, " +
        "Y = {1}, Width = {2}, Height = {3}", VisibleRect.X,
        VisibleRect.Y, VisibleRect.Width, VisibleRect.Height);
    BoundsInfo.Text = String.Format("Bounds: X = {0}, Y = {1}, " +
        "Width = {2}, Height = {3}", BoundsRect.X, BoundsRect.Y,
        BoundsRect.Width, BoundsRect.Height);
}

.NET Framework-Sicherheit

Plattformen

Windows CE, Windows Mobile für Pocket PC

Die .NET Framework und .NET Compact Framework unterstützen nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen für .NET framework.

Versionsinformationen

.NET Compact Framework

Unterstützt in: 3.5, 2.0, 1.0

Siehe auch

Referenz

InputPanel Klasse

Member InputPanel

Microsoft.WindowsCE.Forms-Namespace

Enabled