Hi !
i read the articles but the code still does not work
if uncomment the msgbox the msgbox shows and then frm2 is displayed but
if
comment it frm2 is not displayed ?
and always no invoke is required sub shownotify is not excuted ?
i tired thread.sleep and thread.spinwait but still not working ?
Dim ca As New mailArgs
ca.val = not_text
ca.StartGMail = AddressOf notification
Dim t2 As New Thread(AddressOf ca.StartMail)
t2.IsBackground = True
t2.Start()
t2.Name = "NOTIFICATION"
Sub notification(ByVal val As String)
Dim del As MyDelSub
del = New MyDelSub(AddressOf shownotify)
Dim noti As New frmnotify
If noti.InvokeRequired Then
del.BeginInvoke(val, Nothing, Nothing)
Else
Debug.WriteLine("no invoke ")
noti.Timer3.Interval = 3000
noti.Label1.Text = val
noti.Show()
' MsgBox("i am here")
' if i uncomment the above line it works but if i comment it ,it
does not work ?
End If
End Sub
Private Sub shownotify(ByVal val As String)
Dim noti As New frmnotify
noti.Timer3.Interval = 3000
noti.Label1.Text = val
noti.Show()
Debug.WriteLine("I AM HERE - invoked")
End Sub