|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Announcements
Want a new Job?
Chapters
Services
Feature Zones
|
IntroductionIt's sometimes useful to turn off the PDA screen to save power while your application is running in the background, e.g., if you design a music player, the user may want to turn off the screen for longer play time. Unfortunately, there are few articles on this topic. One C++ program I have found is on MSDN. And thank one's lucky stars, I also found another C# program from OpenNET CF. Then I rewrote it and tested for VB.NET. Using the codeIt's easy to use this code, you simply call The core function here is Declare Function ExtEscapeSet Lib "coredll" Alias _
"ExtEscape" (ByVal hdc As IntPtr, _
ByVal nEscape As Int32, _
ByVal cbInput As Int32, _
ByVal plszInData As Byte(), _
ByVal cbOutput As Int32, _
ByVal lpszOutData As IntPtr) As Int32
A return value greater than zero indicates success and less than zero indicates an error. You can get detail information from the MSDN Library. To use this function, first you must have a Dim vpm() As Byte = {12, 0, 0, 0, 1, 0, 0, 0, _
VideoPowerState.VideoPowerOff, 0, 0, 0, 0}
Here the 9th value is from Public Enum VideoPowerState As Integer
VideoPowerOn = 1
VideoPowerStandBy
VideoPowerSuspend
VideoPowerOff
End Enum
And the last parameter Although the function works well, I was confused by the structure of Points of InterestContact me
Thanks for reading and using my code.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||