![]() |
|
#1
|
|||
|
|||
|
hello i would like to make a program for practice on how to make a visual basic program and i want it to push the letter Z every 50milliseconds.
i want to make 2 buttons and when i push one it starts in 2Min and when i push my F2 button i want it to stop wether or not another program is over it. ( windows live mail on top ) how would i do this? ( please show coding and explain buttons etc. ) thanks |
|
#2
|
|||
|
|||
|
I don't now, what You exactly would reached, but the sample (with a form) look as (with a form, label and timer - for time events it must be):
---------------------------------------------- Private Sub Form_Load() Timer1.Interval = 1000 ' it is 1 sek, for 50 ms must be 50 Label1 = "" ' only for sample result End Sub Private Sub Timer1_Timer() Command1_KeyPress (Asc("Z")) ' invoke a KeyPress event for the form End Sub ------------------------------------------------ The label1 is only for sample Second tail of Your mail I understand not exactly, but I thing, You can use key events (KeyPressed, KeyDown, KeyUp and so on) Best Regards PawelT |