Click here to Skip to main content
15,887,350 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: From Variant/double() to Double() Pin
PozzaVecia1-Feb-12 10:28
PozzaVecia1-Feb-12 10:28 
AnswerRe: From Variant/double() to Double() Pin
Wes Aday1-Feb-12 10:07
professionalWes Aday1-Feb-12 10:07 
GeneralRe: From Variant/double() to Double() Pin
PozzaVecia1-Feb-12 10:30
PozzaVecia1-Feb-12 10:30 
QuestionConvert MS Word doc to PDF Pin
ivo7531-Jan-12 5:58
ivo7531-Jan-12 5:58 
AnswerRe: Convert MS Word doc to PDF Pin
thatraja31-Jan-12 6:40
professionalthatraja31-Jan-12 6:40 
AnswerRe: Convert MS Word doc to PDF Pin
Abhinav S31-Jan-12 6:41
Abhinav S31-Jan-12 6:41 
QuestionHow can I avoid multi-threading? Pin
Rick McLeod30-Jan-12 19:44
Rick McLeod30-Jan-12 19:44 
AnswerRe: How can I avoid multi-threading? Pin
Simon_Whale31-Jan-12 1:18
Simon_Whale31-Jan-12 1:18 
simple answer is to remove the

VB
dim myThread as new thread(addressof ThreadCodeSubRoutine)
myThread.Start


and replace it with the call to the ThreadCodeSubRoutine. But .NET introduced thread saftey so you have to invoke a routine to update the controls that are on your form. a bit similar to

VB
Delegate Sub UpdateMyForm(byref SomeValue as string)

 Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
       dim MyThread as new thread(addressof MyThreadCode)
       MyThread.start("HI")
 End Sub

 Private MyThreadCode(byval Message as string)
       dim DelegateVariable as new UpdateMyForm(Addressof WriteToLabel)
       me.Invoke(DelegateVariable, Message)
 End Sub

 Private Sub WriteToLabel(byval Message as String)
       label1.Text = Message
 end sub


But Also have a read of this MSDN Control.Invoke Method (for Threads use)[^]
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch

GeneralRe: How can I avoid multi-threading? Pin
Rick McLeod31-Jan-12 5:34
Rick McLeod31-Jan-12 5:34 
AnswerRe: How can I avoid multi-threading? Pin
Luc Pattyn31-Jan-12 1:58
sitebuilderLuc Pattyn31-Jan-12 1:58 
AnswerRe: How can I avoid multi-threading? Pin
Dave Kreskowiak31-Jan-12 2:13
mveDave Kreskowiak31-Jan-12 2:13 
AnswerRe: How can I avoid multi-threading? Pin
Bernhard Hiller31-Jan-12 20:55
Bernhard Hiller31-Jan-12 20:55 
QuestionAdd 3 columns from database to ComboBox Pin
ivo7530-Jan-12 8:38
ivo7530-Jan-12 8:38 
AnswerRe: Add 3 columns from database to ComboBox Pin
Simon_Whale30-Jan-12 8:50
Simon_Whale30-Jan-12 8:50 
QuestionVB 2010 code fails when copying root directory. Pin
KreativeKai30-Jan-12 2:30
professionalKreativeKai30-Jan-12 2:30 
AnswerRe: VB 2010 code fails when copying root directory. Pin
Luc Pattyn30-Jan-12 2:45
sitebuilderLuc Pattyn30-Jan-12 2:45 
GeneralRe: VB 2010 code fails when copying root directory. Pin
KreativeKai30-Jan-12 3:09
professionalKreativeKai30-Jan-12 3:09 
AnswerRe: VB 2010 code fails when copying root directory. Pin
Luc Pattyn30-Jan-12 3:21
sitebuilderLuc Pattyn30-Jan-12 3:21 
GeneralRe: VB 2010 code fails when copying root directory. Pin
KreativeKai30-Jan-12 8:07
professionalKreativeKai30-Jan-12 8:07 
GeneralRe: VB 2010 code fails when copying root directory. Pin
Dave Kreskowiak30-Jan-12 4:25
mveDave Kreskowiak30-Jan-12 4:25 
GeneralRe: VB 2010 code fails when copying root directory. Pin
KreativeKai30-Jan-12 8:00
professionalKreativeKai30-Jan-12 8:00 
GeneralRe: VB 2010 code fails when copying root directory. Pin
Dave Kreskowiak30-Jan-12 8:10
mveDave Kreskowiak30-Jan-12 8:10 
GeneralRe: VB 2010 code fails when copying root directory. Pin
KreativeKai30-Jan-12 9:18
professionalKreativeKai30-Jan-12 9:18 
Questionvisual basic6.0 Pin
mahesh kagitha28-Jan-12 18:41
mahesh kagitha28-Jan-12 18:41 
AnswerRe: visual basic6.0 Pin
Richard MacCutchan28-Jan-12 21:40
mveRichard MacCutchan28-Jan-12 21:40 

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.