|
| In VB6, threading was non-existant to all but a few programmers who knew how to tap into the Windows API. This is a brief overview of how to use threading.
The below example is how you would declare two threads and start them running.
Sub One
dim t1 as thread, t2 as thread
t1 = new thread(addressof countto10)
t2 = new thread(addressof countto100)
t1.start()
t2.start()
End Sub
Sub CountTo10()
dim x as integer
For x = 1 to 10
Console.writeLine x
next
end sub
Sub CountTo100()
dim x as integer
For x = 1 to 100
Console.writeLine x
next
end sub
Make a comment*Comments are the views of individuals, they may or may not be correct. All comments are reviewed and accepted or rejected. If you give an email address, you will be sent an email when someone makes a comment on this page.* | Only name and Code is compulsory. |
Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
|