Click here to Skip to main content
15,908,112 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: How to know print given to network printer is success Pin
Dave Kreskowiak9-Nov-09 4:56
mveDave Kreskowiak9-Nov-09 4:56 
QuestionHow to sort the following list? Pin
Milad.Biroonvand8-Nov-09 19:19
Milad.Biroonvand8-Nov-09 19:19 
AnswerRe: How to sort the following list? Pin
Luc Pattyn8-Nov-09 23:38
sitebuilderLuc Pattyn8-Nov-09 23:38 
QuestionFind the difference between two excel sheets using vbscript Pin
Bedke8-Nov-09 16:26
Bedke8-Nov-09 16:26 
QuestionQuestion about threads Pin
crashcup8-Nov-09 12:43
crashcup8-Nov-09 12:43 
AnswerRe: Question about threads Pin
Luc Pattyn8-Nov-09 13:25
sitebuilderLuc Pattyn8-Nov-09 13:25 
GeneralMessage Closed Pin
8-Nov-09 14:27
crashcup8-Nov-09 14:27 
GeneralRe: Question about threads Pin
Luc Pattyn8-Nov-09 15:06
sitebuilderLuc Pattyn8-Nov-09 15:06 
you seem confused.
A method is like a job, a piece of work that needs to be done.
A thread is a worker, something that performs a job.
A process start off having a single thread, and starts executing your Main() method.

You can write:
public void someJob() {
    while(!done) {
        doSomething();
    }
}


and now you can let your main thread execute someJob() by simply calling it.
Or you can start one more thread that executes someJob(), which causes doSomething() to run forever (or until done is set true).

That is the scheme you most often need, e.g. when dealing with TCPListener. No need to create threads all the time.

Smile | :)

Luc Pattyn

I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages


GeneralRe: Question about threads Pin
crashcup8-Nov-09 15:11
crashcup8-Nov-09 15:11 
GeneralRe: Question about threads Pin
Luc Pattyn8-Nov-09 15:13
sitebuilderLuc Pattyn8-Nov-09 15:13 
GeneralRe: Question about threads [modified] Pin
crashcup8-Nov-09 16:10
crashcup8-Nov-09 16:10 
GeneralRe: Question about threads Pin
Steven J Jowett9-Nov-09 9:38
Steven J Jowett9-Nov-09 9:38 
GeneralRe: Question about threads Pin
Luc Pattyn9-Nov-09 9:54
sitebuilderLuc Pattyn9-Nov-09 9:54 
AnswerRe: Question about threads Pin
Dave Kreskowiak8-Nov-09 13:25
mveDave Kreskowiak8-Nov-09 13:25 
GeneralRe: Question about threads Pin
crashcup8-Nov-09 14:18
crashcup8-Nov-09 14:18 
GeneralRe: Question about threads Pin
Dave Kreskowiak8-Nov-09 14:50
mveDave Kreskowiak8-Nov-09 14:50 
GeneralRe: Question about threads Pin
crashcup8-Nov-09 15:09
crashcup8-Nov-09 15:09 
GeneralRe: Question about threads Pin
Dave Kreskowiak9-Nov-09 2:10
mveDave Kreskowiak9-Nov-09 2:10 
QuestionSorting an Array ASCENDING ORDER Pin
PAguilar098-Nov-09 9:31
PAguilar098-Nov-09 9:31 
AnswerRe: Sorting an Array ASCENDING ORDER Pin
Luc Pattyn8-Nov-09 9:40
sitebuilderLuc Pattyn8-Nov-09 9:40 
AnswerRe: Sorting an Array ASCENDING ORDER Pin
Luc Pattyn8-Nov-09 10:06
sitebuilderLuc Pattyn8-Nov-09 10:06 
GeneralRe: Sorting an Array ASCENDING ORDER Pin
PAguilar098-Nov-09 14:53
PAguilar098-Nov-09 14:53 
GeneralRe: Sorting an Array ASCENDING ORDER Pin
Luc Pattyn8-Nov-09 15:12
sitebuilderLuc Pattyn8-Nov-09 15:12 
GeneralRe: Sorting an Array ASCENDING ORDER Pin
PAguilar099-Nov-09 3:15
PAguilar099-Nov-09 3:15 
QuestionHow to add all the items of treeview within the combobox? Pin
Milad.Biroonvand8-Nov-09 1:21
Milad.Biroonvand8-Nov-09 1:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.