SolvedGlobal Hotkeys

Posts 1–15 of 23 · Page 1 of 2
Global Hotkeys
Lol, another help topic by me, big surprise.

Alright, i tried using the GetAsyncKeyState as global hotkeys but they glitch for me insanely often on multiple Windows 7 computers, they also cannot be changed using combo boxes and i'd like my users to be able to customize their hotkeys, but mainly it's the fact that they glitch, and i want them global, so for all applications, and hopefully the code isn't too complicated but if it is then whatever.
Umm, what do you mean by glitch ? And post your code so I can see the problem.
I have the same problem, and as in glitch, they don't work at all.
Sometimes it depends on your operating system. I'm not sure about global, you might have to make 2 programs for 32 and 64 bit, or the 86 or w/e the other one is
I've never had both in one, so I wouldn't know, and there are multiple ways to use hotkeys, sometimes computers will only work with one specific way, if you have multiple ways, make it like:
Code:
If checkbox1.checked = true then
hotkey code here
else
If checkbox2.checked = true then
Different hotkey code here
the coding may be wrong for the 'if checkbox.check = true', because I haven't used it in a long time and I can't check,
it could be if checkbox1.checked then
Idk, what ever it is.

Here is a search on youtube that should help you with the hotkey codes
http://www.youtube.com/results?searc...88.792.11.11.0.
Pixie i understand it's just i had on other programs global hotkeys that we're differtent and plus like i said i wanna change them, and also the fact that the hotkeys dont work, it doesnt even let me push the buttons on the form. but if i disable the hotkeys timer it works
Quote Originally Posted by dudezone2 View Post
Pixie i understand it's just i had on other programs global hotkeys that we're differtent and plus like i said i wanna change them, and also the fact that the hotkeys dont work, it doesnt even let me push the buttons on the form. but if i disable the hotkeys timer it works
If you disable the hotkey timer, the hotkeys work? And hotkeys were always a bitch when I was using visual basics, that's why I never really bothered with it. I'm pretty sure that the timer where the hotkey codes are located is supposed to be enabled, and I think the interval is supposed to be at '1'.
And for making it so users can change the hotkeys, is what I put not what your looking for? Like have a textbox for the person to type in whatever they want to put as the hotkey, and it's best to actually use a comx, that way it's most likely to work for the user. And for they code, instead of the spot where the hotkey number is placed, make it say comx1.text or textbox, or w/e your using, like this:
Instead of this:
Code:
(F6)
The hotkey spot thing might use a number instead of F6, whatever the keyboard numbers are.

Put this:
Code:
(Combobox1.text)   or obviously (Textbox1.text)
And I just saw a thread in the related posts as I was typing this, that might help:
http://www.mpgh.net/forum/33-visual-...y-leeched.html
If you have a timer or a wait period for checking for a hotkey, it's probably not working because when you press the button, the program is waiting. Put a VERY small interval, and I would have a boolean to check whether the code executed by the last keypress is still executing. Like Hassan said, nobody can help to any great extent without seeing your code.
Ugh, t7, i have a small interval, i know how to do it, and no, the HOTKEYS don't work if i disable the timer, the start and stop buttons work, because with the hotkey timer enabled it just glitches and doesn't even work, anyways i'll give the code if you really want it but i'd rather just have another way to do global hotkeys because like i said i want my users to be able to change the hotkeys with combo boxes and i'm pretty sure you can't do it this way
Quote Originally Posted by dudezone2 View Post
Ugh, t7, i have a small interval, i know how to do it, and no, the HOTKEYS don't work if i disable the timer, the start and stop buttons work, because with the hotkey timer enabled it just glitches and doesn't even work, anyways i'll give the code if you really want it but i'd rather just have another way to do global hotkeys because like i said i want my users to be able to change the hotkeys with combo boxes and i'm pretty sure you can't do it this way
You can, I'm pretty sure, you just have to know the right hotkey code, if you can get the right hotkey code, then it will be easy to make them changeable, I think
Exactly. So i'd like to use a different way of making the hotkeys.
Quote Originally Posted by dudezone2 View Post
Exactly. So i'd like to use a different way of making the hotkeys.
Ask NextGen1
He should be able to help, he's really good at this stuff
Quote Originally Posted by dudezone2 View Post
Exactly. So i'd like to use a different way of making the hotkeys.
Just released the source to a HotkeyManager, try that shit out.
I saw that, looks pretty complicated and it kinda confused me but i'll look again.

EDIT: Ya i don't get it at all haha
Quote Originally Posted by dudezone2 View Post
I saw that, looks pretty complicated and it kinda confused me but i'll look again.

EDIT: Ya i don't get it at all haha
It's pretty simple to use, just add the class to your project by going

Project >> Add Class
Name the class HotkeyManager.vb, delete everything that VB autogenerates in the file and replace it with my class. Then just follow the steps I outline in the post, or ask me about whatever your having trouble with.
Hmm, idk, i mean i KNEW(as in i forgot now) a way of having changable global hotkeys and it was still pretty simple. But yours i just dont understand the concept? like its a new form or something, sorry i'm confused
Posts 1–15 of 23 · Page 1 of 2

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?