|
-
Apr 10th, 2009, 07:29 PM
#1
Thread Starter
Member
How do I do these two things? keystroke watch
Hail to all,
Ok what I would like to do is create a program that runs in the task bar next to the time. What I want this to do is listen for the key stroke combo of CTRL-ALT-T no matter what program they are in. When they hit this key stroke I want the program to do is hide the task bar on the bottom of the screen. you know how you can change the hight to two rows one row and so on but you can also drag it down so it has no rows and can't see it. Then when they hit CTRL-ALT-T it will then display the task bar with what ever the hight wa set to. Just don't know what direction to go to do this.
Thanks in advance for all your help.
Mythos
-
Apr 10th, 2009, 08:04 PM
#2
Re: How do I do these two things? keystroke watch
To display your app in the "notification area", commonly (but incorrectly) called the "system tray", you simply add a NotifyIcon to your form. You can then set the Visible properties of the icon to True and the form to False.
To catch that key stroke combination you'll need to use the RegisterHotKey API. If you search the forum you'll find examples. I believe that there's one in the VB.NET CodeBank forum too.
When you say you want to hide the Task Bar, do you mean you want to auto-hide it, i.e. as if they right-clicked the Task Bar, selected Properties and then checked the "Auto-hide the taskbar" box? If so then I'm quite sure you will have to invoke the Windows API, but I couldn't say which function I'm afarid.
-
Apr 10th, 2009, 10:03 PM
#3
Thread Starter
Member
Re: How do I do these two things? keystroke watch
Thanks I will look into what you have suggested.
For the task bar. Say you unlock the taskbar and you know how you can drag the hight of it up another blocks width or three or four times it normal width but you can also drag it down to nothing. I am trying to set it's hight to nothing not auto hide it. The reason is I do not want it to pop up when the mouse is at the bottom of the screen.
Thanks again for your help.
Mythos
-
Apr 10th, 2009, 11:15 PM
#4
Re: How do I do these two things? keystroke watch
I'm guessing that you'd have to set a Registry entry to set the height of the TaskBar but I really couldn't say which. I'm also noy sure how you'd force it to refresh after setting it.
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
|