Tablet.MaximumInputRectangle 屬性
取得 Tablet 物件支援的最大輸入矩形 (以手寫板裝置座標表示)。
命名空間: Microsoft.Ink
組件: Microsoft.Ink (在 Microsoft.Ink.dll 中)
語法
'宣告
Public ReadOnly Property MaximumInputRectangle As Rectangle
'用途
Dim instance As Tablet
Dim value As Rectangle
value = instance.MaximumInputRectangle
public Rectangle MaximumInputRectangle { get; }
public:
property Rectangle MaximumInputRectangle {
Rectangle get ();
}
/** @property */
public Rectangle get_MaximumInputRectangle()
public function get MaximumInputRectangle () : Rectangle
屬性值
型別:System.Drawing.Rectangle
Tablet 支援的最大輸入矩形 (以手寫板裝置座標表示)。
備註
MaximumInputRectangle 屬性所傳回的矩形會指定可以繪製筆墨的最大容許空間。
注意事項: |
---|
如果在特定訊息處理常式內呼叫的話,可能會重新輸入這個函式,造成非預期的結果。處理下列訊息時,請小心避免使用可重新進入的呼叫:WM_ACTIVATE、WM_ACTIVATEAPP、WM_NCACTIVATE、WM_PAINT、WM_SYSCOMMAND (如果 wParam 設定為 SC_HOTKEY 或 SC_TASKLIST) 和 WM_SYSKEYDOWN (處理 ALT+TAB 或 ALT+ESC 組合鍵時)。不過在單一執行緒 Apartment Model (STA) 應用程式中會發生問題。 |
範例
這個範例會報告隨插即用 ID、硬體功能,以及 Tablets 集合中預設 Tablet 物件的最大輸入矩形。
Public Function Report_Hardware_DefaultTablet() As String
Dim SB As StringBuilder = New StringBuilder(1024)
Dim defTablet As Tablet = New Tablets().DefaultTablet
' report on the hardware capabilities of the default tablet
SB.AppendLine("Hardware capabilities of the default tablet: " + defTablet.Name)
SB.AppendLine("PlugAndPlayId: " + defTablet.PlugAndPlayId)
If (defTablet.HardwareCapabilities And TabletHardwareCapabilities.CursorMustTouch) <> 0 Then
SB.AppendLine("CursorMustTouch: YES")
Else
SB.AppendLine("CursorMustTouch: NO")
End If
If (defTablet.HardwareCapabilities And TabletHardwareCapabilities.CursorsHavePhysicalIds) <> 0 Then
SB.AppendLine("CursorsHavePhysicalIds: YES")
Else
SB.AppendLine("CursorsHavePhysicalIds: NO")
End If
If (defTablet.HardwareCapabilities And TabletHardwareCapabilities.HardProximity) <> 0 Then
SB.AppendLine("HardProximity:: YES")
Else
SB.AppendLine("HardProximity:: NO")
End If
If (defTablet.HardwareCapabilities And TabletHardwareCapabilities.Integrated) <> 0 Then
SB.AppendLine("Integrated: YES")
Else
SB.AppendLine("Integrated: NO")
End If
SB.AppendLine("MaximumInputRectangle " + defTablet.MaximumInputRectangle.ToString())
Return SB.ToString()
End Function
public string Report_Hardware_DefaultTablet()
{
StringBuilder SB = new StringBuilder(1024);
Tablet defTablet = new Tablets().DefaultTablet;
// report on the hardware capabilities of the default tablet
SB.AppendLine("Hardware capabilities of the default tablet: " + defTablet.Name);
SB.AppendLine("PlugAndPlayId: " + defTablet.PlugAndPlayId);
SB.AppendLine("CursorMustTouch: " +
(((defTablet.HardwareCapabilities & TabletHardwareCapabilities.CursorMustTouch) != 0) ? "YES" : "NO"));
SB.AppendLine("CursorsHavePhysicalIds: " +
(((defTablet.HardwareCapabilities & TabletHardwareCapabilities.CursorsHavePhysicalIds) != 0) ? "YES" : "NO"));
SB.AppendLine("HardProximity: " +
(((defTablet.HardwareCapabilities & TabletHardwareCapabilities.HardProximity) != 0) ? "YES" : "NO"));
SB.AppendLine("Integrated: " +
(((defTablet.HardwareCapabilities & TabletHardwareCapabilities.Integrated) != 0) ? "YES" : "NO"));
SB.AppendLine("MaximumInputRectangle " + defTablet.MaximumInputRectangle.ToString());
return SB.ToString();
}
平台
Windows Vista
.NET Framework 和 .NET Compact Framework 並不支援各種平台的所有版本。如需支援平台版本的相關資訊,請參閱 .NET Framework 系統需求。
版本資訊
.NET Framework
支援版本:3.0