Thread: Useful Library
View Single Post
  #1 (permalink)  
Old 06-08-2007, 12:47 PM
dzt's Avatar
dzt dzt is offline
Basic4ppc Veteran
 
Join Date: May 2007
Location: Greece
Posts: 353
Awards Showcase
Forum Contributer 
Total Awards: 1
Default Useful Library

Hello,

Attached is dzHW.zip file which contains dzHW.dll library I made (and dzHWdesktop.dll) and a b4ppc sample of how to use it.

Implements dzHW class with the following methods.

SoftReset: Soft resets the device
MessageBeep(wType): Beep! wTypw determines the type of sound and should be one of MsgBox icons (see B4PPC help, topic "MsgBox Constants")
GetTickCount: A high resolution timing method. Returns time elapsed in miliseconds since the computer/device is booted.
GetACLineStatus: Returns 1 if on AC power, 0 if not.
GetBatteryLifePercent: Returns percentage of Battery Life remaining.
InputPanel: Returns or Sets Soft Input Panel (SIP) state. 1 if it's active, 0 if not. Setting InputPanel = true, activates it and InputPanel = false deactivates it.

The desktop version has limited functionality. Implements only MessageBeep, GetTickCount, GetACLineStatus and GetBatteryLifePercent and not tested at all. Other function are dummy.
Attached Files
File Type: zip dzHW.ZIP (114.5 KB, 306 views)
__________________
Dimitris Zacharakis
http://www.terracom.gr
Reply With Quote