Share via


How to crate a Thread in VB6.0

Question

Thursday, March 18, 2010 5:34 PM

Hi,
can any body explain or send a link of articles for how to create a Thread in VB6.0
and samll exaplePS.Shakeer Hussain Hyderabad

All replies (5)

Thursday, March 18, 2010 5:45 PM âś…Answered

Visual Basic 6.0 does not support multi-threading clients natively but you can sort of fake it:

http://www.freevbcode.com/showcode.asp?id=1287

See the following for Visual Basic 6.0 questions:

http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvb/thread/9beafe75-bab5-4d9f-9dae-a395a994083c

Paul ~~~~ Microsoft MVP (Visual Basic)


Thursday, March 18, 2010 6:10 PM

Hi Paul
Actually my problem is to stop a loop when i click on stop button.
example:i have two buttons 'start' and 'stop'
in start buttom i wrote a for loop as

dim i as integer
For i=1 To 100000
print i
Next

when i click on start buuton it prints 'i' value up tp 100000.

my question is when i click on 'Stop' button the for loop has to terminate or Exit from the  loop and should stops the execution.
Is it possible to termianate or Exit the 'for loop'
PS.Shakeer Hussain Hyderabad


Thursday, March 25, 2010 3:09 AM

Hello,
Welcome to MSDN Forum.
You could try Appllication.Exit().This method is used to Close the current process.

Private Sub Stop_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Application.Exit()
End Sub

Best regards!
Liliane Teng

Please mark the replies as answers if they help and unmark them if they provide no help. Thanks


Thursday, March 25, 2010 3:35 AM

Hello,
Welcome to MSDN Forum.
You could try Appllication.Exit().This method is used to Close the current process.

Private Sub Stop_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Application.Exit()
End Sub

Best regards!
Liliane Teng

Please mark the replies as answers if they help and unmark them if they provide no help. Thanks

OP is using VB6

kaymaf

CODE CONVERTER SITE

http://www.carlosag.net/Tools/CodeTranslator/.

http://www.developerfusion.com/tools/convert/csharp-to-vb/.


Thursday, March 25, 2010 5:45 AM

Sayed,

Did you know that Visual Basic 2008 Express is freeware.

http://msdn.microsoft.com/Express

 

Success
Cor