473,806 Members | 2,284 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1270
"Lou" <lo********@com cast.netwrote in news:#p#tVeLpHH A.1244
@TK2MSFTNGP04.p hx.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.begini nvoke"
Jun 2 '07 #2
Lou
Do you have an example?
"Spam Catcher" <sp**********@r ogers.comwrote in message
news:Xn******** *************** ***********@127 .0.0.1...
"Lou" <lo********@com cast.netwrote in news:#p#tVeLpHH A.1244
@TK2MSFTNGP04.p hx.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.begini nvoke"

Jun 2 '07 #3
"Lou" <lo********@com cast.netwrote in news:eSexhKTpHH A.1240
@TK2MSFTNGP04.p hx.gbl:
Do you have an example?

Private Delegate Sub UpdateControlDe legate(ByVal Text as string)

Private Sub UpdateControl(B yval Text as String)
If MyControl.Invok eRequired Then
MyControl.Begin Invoke(New UpdateControlDe legate(AddressO f
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**********@r ogers.comwrote in message
news:Xn******** *************** ***********@127 .0.0.1...
"Lou" <lo********@com cast.netwrote in news:eSexhKTpHH A.1240
@TK2MSFTNGP04.p hx.gbl:
>Do you have an example?


Private Delegate Sub UpdateControlDe legate(ByVal Text as string)

Private Sub UpdateControl(B yval Text as String)
If MyControl.Invok eRequired Then
MyControl.Begin Invoke(New UpdateControlDe legate(AddressO f
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
7832
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 java.lang.*; import javax.comm.*;
6
9137
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 expecting to read. As long as I know the length of the command that I will be getting on the input of the port it works great. The problem is when I don't know how long the data I am receiving is. If I request more bytes than I know I am getting...
8
2065
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 bbsPort As Rs232 = New Rs232 With bbsPort .BaudRate = baud .DataBit = dataBits .Parity = parity .Port = comPort
2
1454
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 COM1-port , and after receiving this string of my application this equipment should return string back into my application. Is it possible by using this Rs232-class to get return string after sending string into COM-port first? I haven't succeeded...
2
5163
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 Microsoft. You can find it overhere: http://www.microsoft.com/downloads/details.aspx?FamilyID=075318ca-e4f1-4846-912c-b4ed37a1578b&DisplayLang=en I did found a lot about the RS232 port on the Internet, but i haven't found the same amount of...
13
6870
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 serially to a BASIC stamp or a Javelin stamp and then use the stamp to set however many pins as 0's or 1's but should it be that hard to do with python. I've looked through how python does serial with the "serial" module but it just uses Java's...
5
2174
by: ad | last post by:
Hi, How can I receive data data from RS232 in Asp.Net?
1
4042
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 to the PC and Powerpoint changes to the corresponding slide. For example: 01n - Go to slide 1 05n - Go to slide 5 02n - Go to slide 2, etc I have managed to get a VBscript macro going in Powerpoint. Once the show begins I click a button to...
1
3147
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 submit local files via the opened RS232 connection to the target.
0
9718
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9596
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10617
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10109
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9186
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6876
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5545
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3849
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3008
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.