> The code that you show should work just fine.
> You'll need to provide more info/code
[quoted text clipped - 31 lines]
> > form from another class?
> > thanks a lot!!!
Well, you failed to mention that you already had an existing form.
Pass a reference of your exisiting form to the constructor of Class1
public class Form1 : System.Windows.Forms.Form
{
private Class1 cls = new Class1(this);
}
public class Class1
{
private Form1 m_frm;
public Class1(Form1 frm)
{
m_frm = frm;
}
public void update()
{
m_frm.label1.Text = "yeah";
}
}
/claes
> Label won't be updated, thanks!
> here is my example :
[quoted text clipped - 86 lines]
> > > form from another class?
> > > thanks a lot!!!
alan - 14 Oct 2004 10:15 GMT
thanks!
but i get the following error
private Class1 cls= new Class1(this);
" Keyword this is not available in the current context"
> Well, you failed to mention that you already had an existing form.
> Pass a reference of your exisiting form to the constructor of Class1
[quoted text clipped - 111 lines]
> > > > form from another class?
> > > > thanks a lot!!!
alan - 14 Oct 2004 10:25 GMT
thanks a lot!
i have solved it
> Well, you failed to mention that you already had an existing form.
> Pass a reference of your exisiting form to the constructor of Class1
[quoted text clipped - 111 lines]
> > > > form from another class?
> > > > thanks a lot!!!