A
Adda
I have an mdi form and I am trying to call a procedure -
"myTest" in the parent from the childform. I am
experimenting using a thread, but the thread is not
releasing the childform. I place a breakpoint in "myTest"
on the parent form and I have a
msgbox("Done here!") on the childform. The program stops
at the breakpoint in "myTest" but does not continue to the
msgbox until after I have finished with "myTest". Here is
what I have in the childform:
----------------------------------------------
Imports System
Imports System.Threading
....
Public Class childfrm
Private Sub btn_Click(...)...
Dim p As New frmParent
Dim t As New Thread(AddressOf p.myTest())
t.Start()
MsgBox("done here!")
End Sub
End Class
------------------------------------------------
"myTest" runs OK, but not reaching msgbox in childform
until "myTest" is done first.
I also get this message in the output window after running
everything:
The thread '<No Name>' (0xb48) has exited with code 0
(0x0).
Am I using the Thread object correctly? Could someone
tell me how to use Threading correctly here?
TIA
Adda
"myTest" in the parent from the childform. I am
experimenting using a thread, but the thread is not
releasing the childform. I place a breakpoint in "myTest"
on the parent form and I have a
msgbox("Done here!") on the childform. The program stops
at the breakpoint in "myTest" but does not continue to the
msgbox until after I have finished with "myTest". Here is
what I have in the childform:
----------------------------------------------
Imports System
Imports System.Threading
....
Public Class childfrm
Private Sub btn_Click(...)...
Dim p As New frmParent
Dim t As New Thread(AddressOf p.myTest())
t.Start()
MsgBox("done here!")
End Sub
End Class
------------------------------------------------
"myTest" runs OK, but not reaching msgbox in childform
until "myTest" is done first.
I also get this message in the output window after running
everything:
The thread '<No Name>' (0xb48) has exited with code 0
(0x0).
Am I using the Thread object correctly? Could someone
tell me how to use Threading correctly here?
TIA
Adda