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?
Originally Posted by ppl2pass 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..............
Originally Posted by willrulz188 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.
Originally Posted by ppl2pass 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")
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.microsof*****m/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.