How to make subroutine calls from one form to another non-blocking?
Any help would be appreciated.
thanks bc
Any help would be appreciated.
thanks bc
Imports System.ThreadingPublic Class Form1 Private Sub MainSub() Dim NewThread As New Thread(AddressOf RunThreaded)NewThread.Start() End Sub Private Sub RunThreaded() 'This is run once NewThread.Start() is called. End SubEnd Class |
Thanks for responding.
I am not using the VB .Net Framework, just plain old vanilla VB6. So in that case i don't think your code snippet will still work? I tried but get compile errors
You'd have to make a OCX control from the subroutine you want to call, and add it to your program as a reference.
if i remember correctly, vb6 will call code from a ocx and continue execution.
Even calls to a control will typically be single-threaded, i.e. the call will block. Threading in VB6 is mostly done with non-UI DLLs on the server side.
If you really want to do threading with a Windows Forms client app, you really should consider using VB.NET. Take a look at the VB Express beta 2 if you want to experiment with it: http://msdn.microsoft.com/VBasic/Express/.
Steven