Click here to Skip to main content
15,892,059 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Check tinytext column in MySQL Database with VB.NET Pin
jzonthemtn29-May-08 2:36
jzonthemtn29-May-08 2:36 
QuestionTrouble with VB.NET and XPath Pin
Dominick Marciano28-May-08 9:45
professionalDominick Marciano28-May-08 9:45 
AnswerRe: Trouble with VB.NET and XPath Pin
MidwestLimey28-May-08 13:26
professionalMidwestLimey28-May-08 13:26 
GeneralRe: Trouble with VB.NET and XPath Pin
Dominick Marciano29-May-08 6:43
professionalDominick Marciano29-May-08 6:43 
GeneralRe: Trouble with VB.NET and XPath Pin
MidwestLimey29-May-08 8:19
professionalMidwestLimey29-May-08 8:19 
QuestionbackgroundWorker Help Pin
Cory Kimble28-May-08 7:35
Cory Kimble28-May-08 7:35 
AnswerRe: backgroundWorker Help Pin
Kschuler28-May-08 8:30
Kschuler28-May-08 8:30 
GeneralRe: backgroundWorker Help Pin
Cory Kimble28-May-08 10:47
Cory Kimble28-May-08 10:47 
I passed it in like you suggested

code Changes:
Private Sub DataReceived( _
                     ByVal sender As Object, _
                     ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) _
                     Handles serialPort.DataReceived

       Dim stringCom As String = serialPort.ReadTo("G")
       serialPort.ReadExisting()



       BackgroundWorker.RunWorkerAsync(stringCom)


   End Sub

   Private Sub backgroundworker_Dowork(ByVal sender As Object, ByVal e As DoWorkEventArgs) Handles BackgroundWorker.DoWork
       Dim argument As Object = e.Argument


       For Value As Integer = 0 To 1
           If BackgroundWorker.CancellationPending Then

               Exit For

           End If

           BackgroundWorker.ReportProgress(Value, argument)
           BackgroundWorker.CancelAsync()
       Next

       ' Threading.Thread.Sleep(100)

   End Sub
   Private Sub backgroundworker_Progresschanged(ByVal sender As Object, ByVal e As ProgressChangedEventArgs) Handles BackgroundWorker.ProgressChanged
       Me.txtbxWeight.Text = e.UserState   This is where it says "Cross-thread operation not valid: Control 'txtbxWeight' accessed from a thread other than the thread it was created on."


   End Sub


Any ideas?
GeneralRe: backgroundWorker Help Pin
Kschuler28-May-08 10:57
Kschuler28-May-08 10:57 
AnswerRe: backgroundWorker Help Pin
Chinners28-May-08 23:05
Chinners28-May-08 23:05 
QuestionGraphics question Pin
sa_runner28-May-08 5:27
sa_runner28-May-08 5:27 
AnswerRe: Graphics question Pin
Chinners28-May-08 5:57
Chinners28-May-08 5:57 
GeneralRe: Graphics question Pin
sa_runner28-May-08 11:41
sa_runner28-May-08 11:41 
QuestionTurning a functional (not object-oriented) program into a .dll Pin
Eric Burns28-May-08 4:52
Eric Burns28-May-08 4:52 
AnswerRe: Turning a functional (not object-oriented) program into a .dll Pin
Steven J Jowett28-May-08 5:54
Steven J Jowett28-May-08 5:54 
GeneralRe: Turning a functional (not object-oriented) program into a .dll Pin
Eric Burns28-May-08 9:36
Eric Burns28-May-08 9:36 
Questionhow to apply style for anchor tag by using vb.net? Pin
subbu.sk28-May-08 3:24
subbu.sk28-May-08 3:24 
QuestionWhat is the difference between VB and VB.NET? Pin
Sarfraz Munna28-May-08 2:16
Sarfraz Munna28-May-08 2:16 
AnswerRe: What is the difference between VB and VB.NET? Pin
Vasudevan Deepak Kumar28-May-08 2:45
Vasudevan Deepak Kumar28-May-08 2:45 
AnswerRe: What is the difference between VB and VB.NET? Pin
Ashfield28-May-08 5:04
Ashfield28-May-08 5:04 
AnswerRe: What is the difference between VB and VB.NET? Pin
Christian Graus28-May-08 13:57
protectorChristian Graus28-May-08 13:57 
GeneralRe: What is the difference between VB and VB.NET? Pin
Herl the Pearl29-May-08 10:12
Herl the Pearl29-May-08 10:12 
AnswerRe: What is the difference between VB and VB.NET? Pin
supercat928-May-08 15:15
supercat928-May-08 15:15 
GeneralRe: What is the difference between VB and VB.NET? Pin
Kevin Brydon28-May-08 22:44
Kevin Brydon28-May-08 22:44 
AnswerRe: What is the difference between VB and VB.NET? Pin
Guffa29-May-08 6:48
Guffa29-May-08 6:48 

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.