Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accessing GUI

Status
Not open for further replies.

stonee74

Technical User
Nov 12, 2001
49
CH
Hi there,

I want to split up my app into a GUI part and the some "working" parts behind.
Which means to access certain parts of the GUI (e.g. Listbox) and fill it with data generated in nother methods of other classes.
For me as a newbie i could maybe imagine some ways to do it, but what's the professional approach on that one? Are there any tutorials around related to that?

thanks a lot in advance,
stonee
 

Just for my understanding;

I have a method in class a, providing a certain information.

internal void OnAnswer(object myobject)
{
myobject.message
}

and my main class

public class Form1 : System.Windows.Forms.Form
{

private System.Windows.Forms.ListBox listBox1;
}

what's the best approach to add myobject.message to my listbox?
and what's the easiest one?

thanks again,
stonee
 
You can make a class library. Your GUI part could just be a shell with Windows Controls and call methods in your library to perform operations.
 
but the GUI part must be informed somehow, that a message has been arrived. Doing that with delegates and events i guess.But i do not know if an event can take objects with it?
thanks again,
stonee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top