MultiRow Windows Forms > Developer's Guide > Using MultiRow > Multi-touch Features > Retrieving the Input Device |
You can operate a touch device using touch or a touch pen. In addition, you can also operate it using the mouse and keyboard. In MultiRow, you can retrieve information to specify which input device was used for operating the GcMultiRow control. This section explains how to get the information related to the input device.
You can use the InputDeviceType property to retrieve information about the input device that is operating GcMultiRow.
The following code retrieves the information related to the input device operating the MultiRow control.
Console.WriteLine("Operated by {0}." , GcMultiRow1.InputDeviceType) |
Console.WriteLine("Operated by {0}." , gcMultiRow1.InputDeviceType); |
You can use the InputDeviceType property and the CellEnter event, to display the touch keyboard only in case of touch operations.
This example displays the touch keyboard.
Private Sub GcMultiRow1_CellEnter(sender As Object, e As GrapeCity.Win.MultiRow.CellEventArgs) Handles GcMultiRow1.CellEnter If GcMultiRow1.InputDeviceType = GrapeCity.Win.MultiRow.InputDeviceType.Touch Then ' Display the touch keyboard in case of touch operation. GcMultiRow1.ShowTouchKeyboard() End If End Sub |
private void gcMultiRow1_CellEnter(object sender, GrapeCity.Win.MultiRow.CellEventArgs e) { if (gcMultiRow1.InputDeviceType == GrapeCity.Win.MultiRow.InputDeviceType.Touch) { // Display the touch keyboard in case of touch operation. gcMultiRow1.ShowTouchKeyboard(); } } |