Multi-threading = Timer no work!

Posts 111 of 11 · Page 1 of 1
Multi-threading = Timer no work!
Whenever I activate a timer in a multi-thread like this

Code:
Timer1.Enabled = true
The timer does not activate.

When I don't put it in a multi-thread it works.

How can I fix?
Ummmmm timer1.start() ..........................
Still doesn't work.
Quote Originally Posted by ppl2pass View Post
Still doesn't work.
Check your code in your timer it could be wrong or wrongly done

Whats your timer code?

Edit: you have to activate the timer you know

like add a button and double click on it and type timer1.start()

then when you click on the button you activate it


this is HIGHLY simple..............
Quote Originally Posted by willrulz188 View Post
Check your code in your timer it could be wrong or wrongly done

Whats your timer code?
MsgBox("Hi")

But it doesnt pop up Hi.
Quote Originally Posted by ppl2pass View Post
MsgBox("Hi")

But it doesnt pop up Hi.
if you use a timer for that you will get a unlimited amount of messages aka you will have to restart to stop it

try just adding a button double clicking and typing msgbox("HI")
Show us your full code.
We can't do much if we don't know your code, I agree with Blubb.

Please post your code
Meh, use System.timers.Timer

within the .net framework, the system timer will create a new thread to
handle the elapsed event


Code:
Dim WithEvents Timer1 As New System.Timers.Timer


Private Sub Timer1_Tick() Handles Timer1.Elapsed
' Your code here, whatever it is
End Sub
System.Windows.Forms.Timer will tick on the the same thread as the
form, It isn't true multi threading.

Read the MSDN article

http://msdn.microsoft.com/en-us/magazine/cc164015.aspx



In case you've not read over your post before submitting, there's practically NO useful information in there for us to make deductions from.
I disagree, he used the words

Timer1.enabled = true and Multithreading in the same sentence.

There is a issue right there.
Posts 111 of 11 · Page 1 of 1
This thread is closed for replies.

Tags for this Thread

None

Need help?