|
-
Jul 3rd, 2004, 11:03 PM
#1
Thread Starter
Lively Member
timer in another form?
how do i modify a timer in another form? one form has a timer with interval set to 100. another form has a textbox and button. when u click the button it should change the interval of the other form
-
Jul 3rd, 2004, 11:17 PM
#2
Thread Starter
Lively Member
-
Jul 4th, 2004, 06:23 AM
#3
Hyperactive Member
Before you have to ensure that you can refer your second Form (the one with the Timer. I named its instance as 'F2') , if so, you can write:
Private Sub BtnCambiaIntervallo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnCambiaIntervallo.Click
F2.Timer1.Interval = Int16.Parse(Me.TextBox1.Text)
End Sub
It put the new interval in your Timer, using the value read in textbox1 (careful, you have to put some validation control of its value, it's only a quick example)
Good job 
If problem is refering the second form, you have to remember to declare it as public in a module.
Live long and prosper (Mr. Spock)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|