Solved

get string from other class

Posted on 2004-10-11
1
259 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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

RIA (Rich Internet Application) tools are interactive internet applications which have many of the characteristics of desktop applications. The RIA tools typically deliver output either by the way of a site-specific browser or via browser plug-in. T…
Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

707 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now