User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Visual Basic 4 / 5 / 6 section within the Software Development category of DaniWeb, a massive community of 456,196 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,924 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums
Views: 864 | Replies: 4
Reply
Join Date: May 2007
Posts: 3
Reputation: matthefridgeman is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
matthefridgeman matthefridgeman is offline Offline
Newbie Poster

Help Timer Help

  #1  
May 7th, 2007
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..
AddThis Social Bookmark Button
Reply With Quote  
Join Date: May 2007
Posts: 12
Reputation: 2thestart is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 1
2thestart 2thestart is offline Offline
Newbie Poster

Re: Timer Help

  #2  
May 7th, 2007
This is a very simple process
all you have to do to change the interval is this.
for example
[code]frminput.timer1.interval=1000
frminput.timer2.interval=1000 [code]
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.
Last edited by 2thestart : May 7th, 2007 at 5:55 pm.
Reply With Quote  
Join Date: May 2007
Posts: 3
Reputation: matthefridgeman is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
matthefridgeman matthefridgeman is offline Offline
Newbie Poster

Re: Timer Help

  #3  
May 7th, 2007
Originally Posted by 2thestart View Post
This is a very simple process
all you have to do to change the interval is this.
for example
[code]frminput.timer1.interval=1000
frminput.timer2.interval=1000 [code]
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.


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
Reply With Quote  
Join Date: May 2007
Posts: 12
Reputation: 2thestart is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 1
2thestart 2thestart is offline Offline
Newbie Poster

Re: Timer Help

  #4  
May 7th, 2007
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
Reply With Quote  
Join Date: May 2007
Posts: 3
Reputation: matthefridgeman is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
matthefridgeman matthefridgeman is offline Offline
Newbie Poster

Re: Timer Help

  #5  
May 8th, 2007
Originally Posted by 2thestart View Post
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..
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Visual Basic 4 / 5 / 6 Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum

All times are GMT -4. The time now is 3:49 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC