Question[Help]Record Button Down Length

Posts 1–11 of 11 · Page 1 of 1
[Help]Record Button Down Length
For example,
If i click the button d for 5 seconds.
The program will tell me that i clicked it for 5 seconds.
you want that coded???

if you want i think i can....pm me with more info......like the skin you want and other features....i can code it for you in a day or so.
Quote Originally Posted by ~J8y~ View Post
you want that coded???

if you want i think i can....pm me with more info......like the skin you want and other features....i can code it for you in a day or so.
In a day or so? it takes 2 mins - 3 hours dude.

Just count how long you hold a button down for?
basically i just need the code.

so if i hold the d button for 5 seconds, the program will tell me that i held the d for 5 seconds.
Skin.....what?...

Simply create a label, a timer , set time interval to 1000(1 sec)
timer starts on key down and stops on key up, timer is label1.text = label1.text + 1, use the final number for the data you need.
Nextgen.....

1. Your one of the better VB coders....
2. I was thinking he whated me to make him one..
nah, just needs help on the coding, in my VB Mpgh SDK i wrote I have the keyboard hook module I made, add it to your project, and turn the timer on and off using standard key hook methods

Button pressed = on
Button Released = off

Should work, and it's super easy as opposed to the few other methods
whats the key down and key up event?
btw when i tried using your keyboard hook it said it failed to attach.
Did you read the whole thing? if you read the documentation, it says vb will block the hook, i explained which setting to shut off


Info: I added this to the module as well as a reminder but Because of visual basic settings and the fact that
VB will attempt to hook the keyboard. To Debug, Build and run .exe from project/debug folder or Modify Settings, Project ---> Application Name Properties ---> Debug ---> Uncheck the checkbox "Enable the Visual Studio hosting process”

it hooked. yay.

how can i implement the key press event?
Posts 1–11 of 11 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us