Having copied a sample of code posted somewhere (here i believe). I am managed to get an icon appear in my status bar for the program i am working on. This works by having a hidden startup form, separate from the main form that the user see's.
What i need to do is have a timer running in the background, whilst the icon is minimised.
Firstly i tried adding it to the hidden startup form, but as expected, the form wouldnt check the timer, if its hidden.
Secondly i tried creating one in code using the code below
and
But needless to say that didnt work as well.
I have lots of process that i want carried out in the background, for this - obviously to start with i am content in getting a timer to show a msgbox every 5 seconds.
Could someone please point me in the right direction?
Thanks
What i need to do is have a timer running in the background, whilst the icon is minimised.
Firstly i tried adding it to the hidden startup form, but as expected, the form wouldnt check the timer, if its hidden.
Secondly i tried creating one in code using the code below
Visual Basic:
Dim timer1 As New Timer
timer1.Interval = 5000
timer1.Enabled = True
timer1.Start()
Visual Basic:
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs)
MsgBox("in form")
End Sub
But needless to say that didnt work as well.
I have lots of process that i want carried out in the background, for this - obviously to start with i am content in getting a timer to show a msgbox every 5 seconds.
Could someone please point me in the right direction?
Thanks
Attachments
Last edited by a moderator: