Results 1 to 3 of 3

Thread: newbie needs help. how do you call another form in a form?

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2002
    Posts
    4

    newbie needs help. how do you call another form in a form?

    in vb6, you just type say formmain.control
    from formwhatever,
    vb.net won't let you do it, i can pass formmain as a class into formwhatever and call that, but what if i just want to call formmain.control from formwhatever without pass in a formmain?
    any way to do that?

  2. #2
    hellswraith
    Guest
    You will always need a reference to the form of the control you want to change.

    You can create a static class (called a module for VBers) that holds references to forms. When your form is created (in the constructor) send a reference over to module. That module should then store that. You would then be able to access that module from other forms to get your reference.

  3. #3

    Thread Starter
    New Member
    Join Date
    Jun 2002
    Posts
    4
    Originally posted by hellswraith
    You will always need a reference to the form of the control you want to change.

    You can create a static class (called a module for VBers) that holds references to forms. When your form is created (in the constructor) send a reference over to module. That module should then store that. You would then be able to access that module from other forms to get your reference.
    great. thanks a lot.
    Last edited by watchmen77; Jun 22nd, 2002 at 12:52 AM.

Posting Permissions

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



Click Here to Expand Forum to Full Width