Turn CUWIN's LCD Backlight On/Off With Code

Applications, examples, and sample programs using products from Comfile Technology

Turn CUWIN's LCD Backlight On/Off With Code

Postby Mike » Tue Jul 19, 2011 1:27 am

This program illustrates how to turn the CUWIN's LCD Backlight on and off with code.

* It works by calling the Windows API function SetDevicePower - http://msdn.microsoft.com/en-us/library/aa918190.aspx
Calling a Windows API function is done using a technique called "Platform Invoke" or "P/Invoke" for short - http://msdn.microsoft.com/en-us/library/aa446536.aspx
* C# and VB.Net projects are attached.
Attachments
CuwinBacklightOnOff_VB.zip
VB.Net Project
(43.64 KiB) Downloaded 714 times
CuwinBacklightOnOff.zip
C# Project
(29.76 KiB) Downloaded 675 times
Mike
Mike
SuperDuperDuper
 
Posts: 551
Joined: Thu Mar 17, 2011 3:54 pm
Location: Seoul, South Korea

Re: Turn CUWIN's LCD Backlight On/Off With Code

Postby Mike » Tue Jul 17, 2012 5:23 pm

It has come to my attention that the code in the original post will not work for the CUWIN 3000/4000 series. Please use this code instead.
Attachments
CuwinBacklightOnOffCF2.zip
C# CUWIN 3000/4000 .Net CF 2.0 Project
(32.3 KiB) Downloaded 578 times
Mike
Mike
SuperDuperDuper
 
Posts: 551
Joined: Thu Mar 17, 2011 3:54 pm
Location: Seoul, South Korea


Return to Applications and Examples

Who is online

Users browsing this forum: No registered users and 1 guest

cron