I have an app that uses a listbox to display program status messages, and a
public function to be used by the solution to update the listbox.
I do not know how to make the listbox public so it can be updated by that
function.
public class frmMain : System.Windows.Forms.Form{
public System.Windows.Forms.ListBox listBox1;
I would like to access the listbox to do something like this ( this code
does not work ):
public class ListboxOne{
public void AddMsg(string xMSG) {
PagingDN.frmMain.listBox1.items.add(PagingDN.frmMa in.listBox1.Items.Count,xM
SG);
if(PagingDN.frmMain.listBox1.Items.Count>100){
PagingDN.frmMain.listBox1.Clear();
}
}
}