Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Form Reload in Visual C#.NET

kvp24kvp24 Posts: 2Member
How do I reload a form, say form1 using a button in the form say button1, in visual C#.NET environ?

thanks

Comments

  • ing_gigioing_gigio Posts: 31Member
    : 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:


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

    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
  • kvp24kvp24 Posts: 2Member
    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:
    :
    :
    : [code]
    : public button1_click(..)
    : {
    : form = new FormOfUrOwn(type1 parameter1, type2 parameter2, ...)
    : }
    : [/code]
    :
    : 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
    :

Sign In or Register to comment.