473,386 Members | 1,699 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Power key function

1
Hello,

I'm developing a device application using the C# on .NET 2005. I'm developing this application for HP iPAQ rx5915 device. My question is that I want to show a message before clicking the POWER KEY. How can i do that?

Best Regards
Jan 23 '08 #1
2 1850
markmcgookin
648 Expert 512MB
Hello,

I'm developing a device application using the C# on .NET 2005. I'm developing this application for HP iPAQ rx5915 device. My question is that I want to show a message before clicking the POWER KEY. How can i do that?

Best Regards
This is very tricky as it doesn't exist in the Windows.Forms.Keys library. I assume you would need some sort of device specific API to tackle that problem. Or there may be some form of Device Power down/shutdown event to catch, but I feel that might be quite tricky as it will probably dispose of your app.
Jan 23 '08 #2
RedSon
5,000 Expert 4TB
This is very tricky as it doesn't exist in the Windows.Forms.Keys library. I assume you would need some sort of device specific API to tackle that problem. Or there may be some form of Device Power down/shutdown event to catch, but I feel that might be quite tricky as it will probably dispose of your app.
You should be able to subscribe to power manager events. When the system goes into shutdown or suspended mode you will get a message. You can also check the OEM specific keys to see if any of them fire when you press the power button. There won't be any thing obvious like OEM_PWR but OEMs usually map their special keys to OEM_* keys.
Jan 23 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Aaron Gallimore | last post by:
Hi, Pretty simple one I think...Is there a "power of" or squared function in C++. This is what i'm trying to achieve. (array-array)*2 this doesnt work with minus numbers so i need a square...
12
by: Roman Töngi | last post by:
I just want to raise a number to a power. e.g.: 16^2 The pow()-function of cmath seems to be not enough. I've read about valarray. Is it really so difficult? Can you give me an example. ...
9
by: Profetas | last post by:
Hi I am using this function to power numbers int power (int m, int n); int power (int base, int n) { int i, p; p = 1; for (i = 1; i <= n; ++i) p *= base; return p;
21
by: utab | last post by:
Hi there, Is there a way to convert a double value to a string. I know that there is fcvt() but I think this function is not a part of the standard library. I want sth from the standard if...
10
by: Magnus | last post by:
I'm migrating an applicationf from Delphi5 to C# .net Framework 2.0, but have some problems convertingt the Power function, because it is not implemented in the framework Math library. Does anyone...
5
by: mathon | last post by:
hi, i develeoped a recursive function for the power and it works fine double power(double x, int n) { if (n < 0) return 1/power(x, -n); else if (n == 0) return 1.0;
9
by: mathon | last post by:
hi, i already posted an entry because of this problem, unfortunately i havent solved it so far..:( I have created a recursion for the calculation of the power like this: double...
5
by: Gus007 | last post by:
Hi all, Need the community great support once more. :) I need to know how to calculate the power of some numbers in C, the problem is that the number is too big , and the compiler gives a...
6
by: maxthebaz | last post by:
Our machines have this requirement: if power failure occurs, many important variables are to be resumed from where they were interrupted after the machine is restarted (power on in this case). In...
8
by: skanemupp | last post by:
how do i solve power(5,1.3)? def power(nbr, po): if po==0: return 1 if po>0: return nbr*power(nbr, po-1) if po<0: return 1/power(nbr, -1*po)
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.