|
-
Oct 18th, 2002, 10:39 AM
#1
Thread Starter
Member
Stick this one in your pipe
and smoke it.
I've got an absolute stinker for you this time, fellow VB assossiates. 
I recently went out and bought a cordless keyboard and mouse pack from Logitec. Good stuff, by the way. Anyway, they both run on battery (unless you neglected to reason with the fact that electricity cannot run through air) and there's a problem. I use my computer a lot, and the battery frequents dropouts, which means I have to get my other pair of AA rechargables stashed away in my recharger somewhere (which I replace with the empty ones and circle the process, etc.).
Anyway, because of this pathetic battery size, I always have to pop into Control Panel > Logitec Utilities > Mouse, and check my usability. How about THIS: (just for fun)
Create a program in VisualBasic (where else?) that runs when I load my computer (sticking it in my startup folder) and checks my battery consumption. There's a bunch of stages the battery level goes through in Control Pane: Good, Average, Critical (there may be one in between). If it detects that the battery is better than Critical, leave it alone. If it is critical, give me an error message to change my battery very soon. Now, I bet you're saying: he has to change it anyway, so who cares? Well, it's half fun, but half also practicality. I don't actually start my ("exhaustive....") day of programming before I have a fresh set of batteries. This doesn't handle what happens if the battery actually goes Critical while using it, of course. As I said, it's just for fun, and the API would be kind of cool.
Any ideas guys?
-
Oct 18th, 2002, 11:02 AM
#2
Re: Stick this one in your pipe
Originally posted by WickEd101
Any ideas guys?
get ones with cords
but seriously.. you would have to be able to detect that info.. i don't think you would be able to do it unless a reference or something is avaiable for them in your VB references
-
Oct 18th, 2002, 01:21 PM
#3
Fanatic Member
Maybe you could use some API to open the control you want to view in the control panel for viewing...or
Maybe you could shell the Control Panel in Form_Load;
Shell "C:\Winnt\system32\control.exe , vbNormalFocus"
or
Shell "C:\Windows\system32\control.exe , vbNormalFocus"
and use (forgive me) "Send Keys" to navigate to what you need...
just some suggestions...
JO
"I have not failed. I've just found 10,000 ways that won't work."
'Thomas Edison'
"If we knew what it was we were doing it wouldn't be called research, would it?"
'Albert Einstein'
VB6
-
Oct 18th, 2002, 01:30 PM
#4
well....
I was thinking about going cordless.... but now.... never ocurred to me that they would suck the life outta batteries that badly.....
I don't think it needs to be a reference... only if it's got creatable objects, which I imagine the drivers proly aren't..... however..... in order for drivers to operate properly in Windows, there must be some sort of interface that Windows is able to hook into -- or is looking for....
Wonder if Logitech or MS have the API published......
jsut a thought.....
-
Oct 18th, 2002, 01:44 PM
#5
Addicted Member
I have an older logitech cordless desktop and I use my PC a lot.. I mean A LOT... and go through a set of batteries every few months... Must be something in the new ones or perhaps a short somewhere.. Dunno, just my 2c.
-------------------------
My name says it all!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|