Form1 frm=new form1();
frm.show();
in this mode my form1 values are refreshed so i want show the form with valued
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Suthish NairPosted Sep 13, 2013, 7:59 AM
Kunal VaishyaPosted Sep 13, 2013, 1:53 AM
refer this link may be help full.
http://msdn.microsoft.com/en-us/library/system.windows.forms.control.visiblechanged.aspx
Parthiban BPosted Sep 13, 2013, 12:05 AM
Which visible change event?
Suthish NairPosted Sep 12, 2013, 8:37 AM
Jignesh TrivediPosted Sep 12, 2013, 5:05 AM
I think, problem is you create object of form every time...
instead of doing this create form object at globle place and show form with out creating object if form object is not null.
in button click event
if(form2 == null)
{
form2 = new Form2();
}
form2.Show()
make form2 object globally accessable....
hope this will help you.
Parthiban BPosted Sep 12, 2013, 4:44 AM
problem in show()
how to avoid the refresh
Jignesh TrivediPosted Sep 12, 2013, 4:30 AM
hide method is also supported by C#
here instead of me use this
this .Hide()
Parthiban BPosted Sep 12, 2013, 4:26 AM
1. any way to avoiding the refresh
2.without creating the instance we get the same result like in vb.net(me.hide() form1.show())
Parthiban BPosted Sep 12, 2013, 4:20 AM
For example we have 2 forms
In form 1
1 Datagridview and 2 Button Controls
Button1_click event
//Normal Data dind from database to gridview-here no problem
Button2_click event
this.hide
form2 frm=new from2();
frm.show();
//like this way i hide my form1 and show my form 2
now form2 will shown
in Form 2
for example
1 button control in there
on that button _click event
this.hide();
form1 frm=new form1();//here is the problem
frm.show();
So i want what i have in form 1 datagridview, before click the button 2
that should be displayed when i will open the particular forms
now the data gridview will gone free so i dont want that (refresh in form 1)
Jignesh TrivediPosted Sep 12, 2013, 4:18 AM
we you create object of any form in winwows form application, at this time all values are refreshed on this forms....
hope this answer of your quesition.
please provide more information if not..
Sanjeeb LenkaPosted Sep 12, 2013, 12:53 AM
I didn't get your point. plz provide more details.