업데이트: 2007년 11월
StylusButtons 개체에서 지정된 인덱스에 있는 스타일러스 단추의 이름을 반환합니다.
네임스페이스: Microsoft.StylusInput
어셈블리: Microsoft.Ink(Microsoft.Ink.dll)
구문
‘선언
Public Function GetName ( _
index As Integer _
) As String
‘사용 방법
Dim instance As StylusButtons
Dim index As Integer
Dim returnValue As String
returnValue = instance.GetName(index)
public string GetName(
int index
)
public:
String^ GetName(
int index
)
public String GetName(
int index
)
public function GetName(
index : int
) : String
매개 변수
- index
형식: System.Int32
반환 값
형식: System.String
스타일러스 단추의 이름을 반환합니다.
설명
이름은 디지타이저 제조업체에서 정의합니다.
이 컬렉션에 제공된 단추 목록은 디지타이저에서 지원되는 단추를 나타내며, 펜에는 이러한 단추가 없을 수도 있습니다. 플러그 인에서 StylusButtonDown 및 StylusButtonUp 알림을 받을 때 특정 스타일러스 단추의 상태를 판단하고 존재 여부를 확인할 수 있습니다.
예제
이 Microsoft Visual C# .NET 예제에서는 폼에 구현된 StylusButtonUp 메서드에 대한 이벤트 처리기를 보여 줍니다.
public class Form1 : Form, IStylusAsyncPlugin
{
private RealTimeStylus rts;
private DynamicRenderer dr;
private System.Windows.Forms.TextBox textBox1;
public Form1()
{
rts = new RealTimeStylus(this);
dr = new DynamicRenderer(this);
rts.SyncPluginCollection.Add(dr);
rts.AsyncPluginCollection.Add(this);
rts.Enabled = true;
dr.Enabled = true;
InitializeComponent();
}
// ...
public Microsoft.StylusInput.DataInterestMask DataInterest
{
get{return DataInterestMask.AllStylusData;}
}
public void StylusButtonUp(RealTimeStylus sender, StylusButtonUpData data)
{
textBox1.AppendText(
string.Format("{0} button up: {1} ({2}){3}",
data.Stylus.Name,
data.Stylus.Buttons.GetName(data.ButtonIndex),
data.ButtonIndex.ToString(),
Environment.NewLine)
);
}
// ...
플랫폼
Windows Vista, Windows XP SP2, Windows Server 2003
.NET Framework 및 .NET Compact Framework에서 모든 플랫폼의 전체 버전을 지원하지는 않습니다. 지원되는 버전의 목록을 보려면 .NET Framework 시스템 요구 사항을 참조하십시오.
버전 정보
.NET Framework
3.0에서 지원
참고 항목
참조
Microsoft.StylusInput.PluginData.StylusButtonDataBase