StylusButtonState 列舉

定義

表示 StylusButton 的狀態。

public enum class StylusButtonState
public enum StylusButtonState
type StylusButtonState = 
Public Enum StylusButtonState
繼承
StylusButtonState

欄位

Down 1

按鈕已按下。

Up 0

按鈕未按下。

範例

下列範例示範如何判斷 的狀態 StylusButton

// Get the state of the StylusButton
switch (myStylusButton.StylusButtonState)
{
    case StylusButtonState.Down:
        textbox1.AppendText("StylusButton.State: Down\n");
        break;

    default:  // StylusButtonState.Up
        textbox1.AppendText("StylusButton.State: Up\n");
        break;
}
' Get the state of the StylusButton
Select Case myStylusButton.StylusButtonState
    Case StylusButtonState.Down
        textbox1.AppendText("StylusButton.State: Down" + vbCrLf)
    Case Else ' StylusButtonState.Up
        textbox1.AppendText("StylusButton.State: Up" + vbCrLf)
End Select

適用於