Results 1 to 2 of 2

Thread: how to pass a form in a method

  1. #1
    Junior Member
    Join Date
    Feb 09
    Posts
    26

    Exclamation how to pass a form in a method

    Hi ppl

    Actually I mean a form object passing to method.

    By that I can create instance of that object inside that method. I want to catch the form object in a veriable. and make a form instance by using that varible.
    Exml:

    void showForm( catch the form object)
    {
    objectName frm = new objectName();// create an intance here.
    }

    public void button_click(..)
    {
    showForm(formObject);\\ formObject is a type by this i can creat form instance.
    }

    If you cant get inform me.

    Thanks

  2. #2
    ASP.NET Moderator gep13's Avatar
    Join Date
    Nov 04
    Location
    The Granite City
    Posts
    21,838

    Re: how to pass a form in a method

    Hey,

    I am not sure that I follow what you mean?!?

    Does the form already exist in your project? If so, you should be able to create an instance of it directly without needing to pass the form around as a variable.

    Can you elaborate on what it is you are trying to do?

    Gary

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •