?
Solved

get string from other class

Posted on 2004-10-11
1
Medium Priority
?
302 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

by:
huyntminh earned 500 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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.
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Simple Linear Regression
Starting up a Project
Suggested Courses

800 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