Hi
I have a timer event (every second) that checks to see if a condition is true, if so then it raises a form. Currently the program just raises the form every second - which is obviously annoying.
I would like to check if the form is currently running then only create a new instance of it, if it isnt. The code below is in a procedure that is called from the timer event
Could someone tell me what i am doing wrong pls?
Thanks.
I have a timer event (every second) that checks to see if a condition is true, if so then it raises a form. Currently the program just raises the form every second - which is obviously annoying.
I would like to check if the form is currently running then only create a new instance of it, if it isnt. The code below is in a procedure that is called from the timer event
Visual Basic:
Dim FrmAllowDis As New FrmAllowDis
FrmAllowDis.Text = ThisProcess.ProcessName
'Display the form
If FrmAllowDis.ShowDialog() = System.Windows.Forms.DialogResult.Yes Then
End If
Could someone tell me what i am doing wrong pls?
Thanks.