| Mirage Source http://www.miragesource.net/forums/ |
|
| F1 http://www.miragesource.net/forums/viewtopic.php?f=201&t=1548 |
Page 1 of 1 |
| Author: | Braydok [ Thu Mar 22, 2007 1:30 am ] |
| Post subject: | F1 |
How do you register is someone has pressed F1? |
|
| Author: | Tony [ Thu Mar 22, 2007 3:24 am ] |
| Post subject: | |
What do you mean? Open the new account window? |
|
| Author: | Spodi [ Thu Mar 22, 2007 3:51 am ] |
| Post subject: | |
GetAsynceKeyState(vbKeyF1)? |
|
| Author: | Verrigan [ Thu Mar 22, 2007 3:59 am ] |
| Post subject: | |
Code: Private Sub Form_KeyUp(keycode As Integer, shift As Integer)
If keycode = vbKeyF1 Then 'Do some code End If End Sub Obviously there are many ways to do this, and some work better than others. (Points to Spodi's suggestion.) |
|
| Author: | Spodi [ Thu Mar 22, 2007 4:25 am ] |
| Post subject: | |
With my method, you will get it if the key is pressed even if the window doesn't have the focus (ie they're doing something in the background). You also have to use some form of timer to constantly check for the event since it is not event-driven like KeyUp/KeyDown subs. With Verrigan's method, you have to have focus on the correct object, and only one object can receive the KeyUp/KeyDown/KeyPress event. This means if they click a form and press buttons, it won't register under Form_KeyDown. Pain in the butt either way. |
|
| Author: | Braydok [ Thu Mar 22, 2007 7:22 pm ] |
| Post subject: | |
Well, I'm just aiming to create a admin panel like PlayerWorlds's. So I just need to be able to check if someone has puched the f1 key, and if so then make visible the panels that they can see. |
|
| Author: | Robin [ Thu Mar 22, 2007 7:39 pm ] |
| Post subject: | |
http://www.animerealm.co.uk/uploads/tutorials/Temporary_Archive/Admin%20Panel%20Tut.html |
|
| Author: | Braydok [ Mon Mar 26, 2007 12:28 pm ] |
| Post subject: | |
Oh, thnaks, this'll help alot. ~Braydok |
|
| Page 1 of 1 | All times are UTC |
| Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |
|