0

Hi im new to VB and ive built a program that uses two timers to produce an osilating output..But i want to change the value of each timer INTERVAL prior to running the timers. Ive created two txt boxes to hold the timer interval times and a start button..It all works at the moment except the txt boxes..

2
Contributors
4
Replies
5
Views
11 Years
Discussion Span
Last Post by matthefridgeman
0

This is a very simple process
all you have to do to change the interval is this.
for example

frminput.timer1.interval=1000 
frminput.timer2.interval=1000 

all you have to do is put this code were you want it. ex command button or form load
just place it in the area you want.
also 1000 is = to 1sec in vb.
i hope this was of some help.

Edited by happygeek: fixed formatting

0

Thanks for you reply..if i wanted a txt box to set the interval timer i could just change the 1000 in your code to a variable ''say I''..Its a work in progress thought..lol

Edited by happygeek: fixed formatting

0

For a text box i would do
n=val(frminput.text1.text)
and you can now put "n" into the timer code i gave you
frminput.timer1.interval=n
;)

0

For a text box i would do
n=val(frminput.text1.text)
and you can now put "n" into the timer code i gave you
frminput.timer1.interval=n
;)

Thanks il have a play tonight...thanks alot for your time..u have saved me hours..

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.