C#

Moderators: None (Apply to moderate this forum)
Number of threads: 2720
Number of posts: 5746

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Form Reload in Visual C#.NET Posted by kvp24 on 26 Jul 2004 at 5:30 AM
How do I reload a form, say form1 using a button in the form say button1, in visual C#.NET environ?

thanks

Report
Re: Form Reload in Visual C#.NET Posted by ing_gigio on 26 Jul 2004 at 3:55 PM
: How do I reload a form, say form1 using a button in the form say button1, in visual C#.NET environ?
:
: thanks
:
:
I'm not sure of understanding what u exactly mean with "reload a form"
I imagine u mean to redraw it...

I don't know if there's is an explicit method in .NET which allows u to directly doing it...but I think u can overcome this problem by simply instantiating a new object in the button1.Click event handler

what I mean is:


public button1_click(..)
{
   form = new FormOfUrOwn(type1 parameter1, type2 parameter2, ...)
}


which kind of parameter u shold pass to the constructor? The ones which will make display the form the values u want it to. If u built ur FormOfUrOwn class properly, anything u'll have to do will be to pass the actual values of the fields of the "old version" of the form, so that the new one will be initialized exactly as the old one was.

Hope I have been clear enough, sorry if not :P
Report
Re: Form Reload in Visual C#.NET Posted by kvp24 on 27 Jul 2004 at 6:51 AM
thanks Ing.

: : How do I reload a form, say form1 using a button in the form say button1, in visual C#.NET environ?
: :
: : thanks
: :
: :
: I'm not sure of understanding what u exactly mean with "reload a form"
: I imagine u mean to redraw it...
:
: I don't know if there's is an explicit method in .NET which allows u to directly doing it...but I think u can overcome this problem by simply instantiating a new object in the button1.Click event handler
:
: what I mean is:
:
:
:
: public button1_click(..)
: {
:    form = new FormOfUrOwn(type1 parameter1, type2 parameter2, ...)
: }
: 

:
: which kind of parameter u shold pass to the constructor? The ones which will make display the form the values u want it to. If u built ur FormOfUrOwn class properly, anything u'll have to do will be to pass the actual values of the fields of the "old version" of the form, so that the new one will be initialized exactly as the old one was.
:
: Hope I have been clear enough, sorry if not :P
:




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.