473,324 Members | 2,417 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Rs232 control

Lou
I am using the rs232 control and when I get the datareceived and try to
assign it
to a textbox I get some sort of thread message error

-Lou
Jun 2 '07 #1
4 1252
"Lou" <lo********@comcast.netwrote in news:#p#tVeLpHHA.1244
@TK2MSFTNGP04.phx.gbl:
I am using the rs232 control and when I get the datareceived and try to
assign it
to a textbox I get some sort of thread message error

You need to marshal the call back to the GUI thread using
'control.begininvoke"
Jun 2 '07 #2
Lou
Do you have an example?
"Spam Catcher" <sp**********@rogers.comwrote in message
news:Xn**********************************@127.0.0. 1...
"Lou" <lo********@comcast.netwrote in news:#p#tVeLpHHA.1244
@TK2MSFTNGP04.phx.gbl:
>I am using the rs232 control and when I get the datareceived and try to
assign it
to a textbox I get some sort of thread message error


You need to marshal the call back to the GUI thread using
'control.begininvoke"

Jun 2 '07 #3
"Lou" <lo********@comcast.netwrote in news:eSexhKTpHHA.1240
@TK2MSFTNGP04.phx.gbl:
Do you have an example?

Private Delegate Sub UpdateControlDelegate(ByVal Text as string)

Private Sub UpdateControl(Byval Text as String)
If MyControl.InvokeRequired Then
MyControl.BeginInvoke(New UpdateControlDelegate(AddressOf
UpdateControl), new object(){Text})
Else
... Do Update Here
End If
End Sub
P.S. you don't need to create the delegate if you're not passing in
parameters - in which case you can just use the built in MethodInvoker
delegate.
Jun 2 '07 #4
Lou
AWESOME!

"Spam Catcher" <sp**********@rogers.comwrote in message
news:Xn**********************************@127.0.0. 1...
"Lou" <lo********@comcast.netwrote in news:eSexhKTpHHA.1240
@TK2MSFTNGP04.phx.gbl:
>Do you have an example?


Private Delegate Sub UpdateControlDelegate(ByVal Text as string)

Private Sub UpdateControl(Byval Text as String)
If MyControl.InvokeRequired Then
MyControl.BeginInvoke(New UpdateControlDelegate(AddressOf
UpdateControl), new object(){Text})
Else
... Do Update Here
End If
End Sub
P.S. you don't need to create the delegate if you're not passing in
parameters - in which case you can just use the built in MethodInvoker
delegate.

Jun 2 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Dan | last post by:
I wnat to see in browser an status from an device connected on rs232 port The java class for read from serial port is: //Serial.java import java.io.*; import java.util.*; import...
6
by: Ken Breit | last post by:
I am using the RS232.vb class to talk to the serial port. The problem I am having is when I try to read if anything is on the comm port. I call the read method, with the number of bytes I am...
8
by: Terry Olsen | last post by:
I'm trying to use the RS232 class that was in the Platform SDK (i think). Has anyone else used this with events successfully? Here's what i've got: ====================== Public WithEvents...
2
by: Mika M | last post by:
Hi! My application uses Rs232-class, which was shipped with "101 VB.NET Samples\Framework - Using the COM Port". I need to sent certain kind of string into peripheral equipment attached to...
2
by: Wouter van Teijlingen | last post by:
Dear Readers, I was reading about how to control the COM and LPT port using VB .NET. I've found a lot of information, and it was very useful to me. I found an example program on the site of...
13
by: jay.dow | last post by:
I want to write to the pins of an RS232 without using the serial protocol. The use would be every pin could act to complete a circuit in customized hardware. I could use python to communicate...
5
by: ad | last post by:
Hi, How can I receive data data from RS232 in Asp.Net?
1
by: EmmettBrown | last post by:
Hello, Just wondering if anyone can advise. I am trying to remotely control Powerpoint using a microprocessor. I am using RS232 (COM1). The idea is that the microprocessor sends ASCII strings...
1
by: fidel | last post by:
Hello, my target is a small application which: * Start as a small Window * Offers several input fields for RS232-related connection informations (like parity etc...) * A Send-function to...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.