Solved

get string from other class

Posted on 2004-10-11
1
284 Views
Last Modified: 2010-04-17
I have situation like this: I have one form with textbox and I have another class ComPort with thread for reciving characters from modem. How could I write those characters to the form class (into textBox) ?
0
Comment
Question by:ssdjgru1
1 Comment
 

Accepted Solution

by:
huyntminh earned 125 total points
ID: 12284473
Hi,

You can write a public property {set} , eg : Text,  in the form where textbox is locating on.
Initialize a public static variable (in some public class, eg : Common) that reference to the form class.
Then, in the ComPort, when there is event that characters come from the modem, hope you have this type of event,  you just call the set property to update information to the textbox.


0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question