already i tryed this... from1Reference is null !!!
(using .net 2.0)
"Morten Wennevik" <Mo************@hotmail.comha scritto nel messaggio
news:op***************@tr024.bouvet.no...
How do you create the two forms?
If Form2 is created by Form1, pass a reference to Form1 in the
constructor. If Form1 is created by Form2, then you have reference.
class Form1
{
// constructor
public Form1()
{
}
}
class Form2
{
private Form1 form1Reference;
// constructor
public Form2(Form1 form1Reference)
{
this.form1Reference = form1Reference
}
void SomeMethod()
{
if(form1Reference.Visible)
{
// do stuff
}
}
}
On Mon, 07 Aug 2006 13:47:22 +0200, Gian Paolo <no****@nospam.itwrote:
i would like to reference it but i do not know how!!!!
"Morten Wennevik" <Mo************@hotmail.comha scritto nel messaggio
news:op***************@tr024.bouvet.no...
>Hi Gian,
Do you mean the Form.Visible property or how to determine if the form is
partially or fully covered by another window?
To be able to check the Visible property on Form 1 from Form 2 you need
a
reference to it.
On Mon, 07 Aug 2006 12:48:46 +0200, Gian Paolo <no****@nospam.itwrote:
>>from from 2 how can i see if form 1 is visible or not?
--
Happy Coding!
Morten Wennevik [C# MVP]
--
Happy Coding!
Morten Wennevik [C# MVP]