Overview
 Top Next

The Hardware library wraps several different native API's.
This library can only be used on the device.
The Hardware library supports:
- Reading the device id.
- Preventing the back light from suspending.
- Preventing the device from suspending.
- Run an application at a certain time or after a certain event.
- Send keystrokes to the focused control.
- Send mouse clicks to the screen.
- Catch the hardware buttons using HardKey object.
- Finding all mounted storage cards.
- Clipboard operations.
- Finding the .Net version.
- Managed memory operations.
- Finding the path of special folders (like windows folder).
- SIP (Soft Input Panel) hide / show event and SIP height.
- ShowTodayScreen method which can help in creating background running applications.
- ChangeInputMode - (Smartphones only) Changes the input mode.
- Change Bluetooth mode.
- Send windows messages to controls (device and desktop).
Note that some of the functions will not work on all devices.
This library is only functional on the device.
If you like to build the application on the desktop you can use the HardwareDesktop.dll file.
It is a shallow copy of the Hardware library (without any functionality).

Example:
'Add a Hardware object named Hardware1
Sub Globals

End Sub

Sub App_Start
      Form1.show
      Hardware1.New1
      msgbox("Device ID: " & Hardware1.GetDeviceID)
      Hardware1.BackLightOn 'Prevents the back light from suspending
      Hardware1.RunAppAtEvent(AppPath & "\MyApp.exe", Hardware1.evWakeup) 'MyApp will be launched each time the device is turned on
      Hardware1.RunAppAtTime (AppPath & "\MyApp.exe", TimeAdd(now,0,5,0)) 'MyApp will be launched in 5 minutes
      AddTimer("Timer1")
      Timer1.Interval = 5000 '5 seconds
      Timer1.Enabled = true
      TextBox1.Focus
      Hardware1.KeyPress(asc("1")) 'Writes 1
      
      Hardware1.KeyDown(160) 'Holds the left shift down
      Hardware1.KeyPress(asc("1")) 'Writes !
      Hardware1.KeyUp(160) 'Frees the left shift
End Sub

Sub Timer1_Tick
      Hardware1.KeepAlive 'Resets the system idle timers
End Sub