MaximumInputRectangle Property
MaximumInputRectangle Property |
Gets the maximum input rectangle, in tablet device coordinates, that the IInkTablet object supports.
Declaration
[C++]
[C++]
[propget] HRESULT get_MaximumInputRectangle ([out, retval] IInkRectangle** MaximumInputRectangle);
[Microsoft® Visual Basic® 6.0]
[Visual Basic]
Public Property Get MaximumInputRectangle() As InkRectangle
Property Value
InkRectangle The maximum input rectangle, in tablet device coordinates, that the tablet supports.
This property is read-only.
Return Value
HRESULT value | Description |
---|---|
S_OK | Success. |
E_POINTER | The parameter is an invalid pointer. |
E_INK_EXCEPTION | An exception occurred inside the method. |
E_FAIL | An unspecified error occurred. |
Remarks
The rectangle returned by the MaximumInputRectangle property specifies the maximum allowable space in which ink can be drawn.
Example
[Visual Basic 6.0]
This Visual Basic 6.0 example reports on the properties of each tablet that is available in the InkTablets collection.
Dim theInkCollector As InkCollector
Private Sub Command1_Click()
Text1.Text = ReportOnEachTablet()
End Sub
Private Sub Form_Load()
Set theInkCollector = New InkCollector
theInkCollector.hWnd = Me.hWnd
theInkCollector.Enabled = True
End Sub
Public Function ReportOnEachTablet() As String
Dim theTablets As InkTablets
Set theTablets = New InkTablets
Dim theReport As String
theReport = vbCrLf
'Iterate over the tablets in the collection,
'reporting on each one.
Dim theTablet As IInkTablet
For Each theTablet In theTablets
theReport = theReport & "Tablet Name: " & theTablet.name & vbCrLf
If theTablets.DefaultTablet.name = theTablet.name Then
theReport = theReport & "(Default)" & vbCrLf
End If
theReport = theReport & "PlugAndPlayId: " & _
theTablet.PlugAndPlayId & vbCrLf
theReport = theReport & "HardwareCapabilities: " & _
theTablet.HardwareCapabilities & vbCrLf
If (theTablet.HardwareCapabilities And _
THWC_CursorMustTouch) <> 0 Then
theReport = theReport & " CursorMustTouch" & vbCrLf
End If
If (theTablet.HardwareCapabilities And _
THWC_CursorsHavePhysicalIds) <> 0 Then
theReport = theReport & " CursorsHavePhysicalIds" & vbCrLf
End If
If (theTablet.HardwareCapabilities And _
THWC_HardProximity) <> 0 Then
theReport = theReport & " HardProximity" & vbCrLf
End If
If (theTablet.HardwareCapabilities And _
THWC_Integrated) <> 0 Then
theReport = theReport & " Integrated" & vbCrLf
End If
On Error Resume Next
theReport = theReport & "MaximumInputRectangle " & _
theTablet.MaximumInputRectangle & vbCrLf
'Report on each supported Packet Property.
theReport = theReport & "IsPacketPropertySupported:" & vbCrLf
theReport = theReport & GetProperty(theTablet, _
AltitudeOrientation, _
"AltitudeOrientation")
theReport = theReport & GetProperty(theTablet, _
AzimuthOrientation, _
"AzimuthOrientation")
theReport = theReport & GetProperty(theTablet, _
ButtonPressure, "ButtonPressure")
theReport = theReport & GetProperty(theTablet, _
NormalPressure, "NormalPressure")
theReport = theReport & GetProperty(theTablet, _
PacketStatus, "PacketStatus")
theReport = theReport & GetProperty(theTablet, _
PitchRotation, "PitchRotation")
theReport = theReport & GetProperty(theTablet, _
RollRotation, "RollRotation")
theReport = theReport & GetProperty(theTablet, _
SerialNumber, "SerialNumber")
theReport = theReport & GetProperty(theTablet, _
TangentPressure, "TangentPressure")
theReport = theReport & GetProperty(theTablet, _
TimerTick, "TimerTick")
theReport = theReport & GetProperty(theTablet, _
TwistOrientation, "TwistOrientation")
theReport = theReport & GetProperty(theTablet, X, "X")
theReport = theReport & GetProperty(theTablet, _
XTiltOrientation, "XTiltOrientation")
theReport = theReport & GetProperty(theTablet, Y, "Y")
theReport = theReport & GetProperty(theTablet, _
YawRotation, "YawRotation")
theReport = theReport & GetProperty(theTablet, _
YTiltOrientation, "YTiltOrientation")
theReport = theReport & GetProperty(theTablet, Z, "Z")
theReport = theReport & vbCrLf
Next
ReportOnEachTablet = theReport
End Function
Public Function GetProperty( _
ByVal theTablet As IInkTablet, _
ByVal theGuid As String, _
ByVal name As String) _
As String
Dim theReport As String
Dim theMin As Long
Dim theMax As Long
Dim theUnits As TabletPropertyMetricUnit
Dim theResolution As Single
' If this particular property is supported,
' report the name and property metrics information.
If theTablet.IsPacketPropertySupported(theGuid) Then
theTablet.GetPropertyMetrics _
theGuid, theMin, theMax, theUnits, theResolution
theReport = " " & name & vbCrLf & _
" Max: " & theMax & vbCrLf & _
" Min: " & theMin & vbCrLf & _
" Resolution: " & theResolution & _
vbCrLf & _
" Units: " & theUnits & vbCrLf
End If
GetProperty = theReport
End Function