Results 1 to 3 of 3

Thread: Accessing MDI Form from a Module

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Apr 2003
    Location
    India
    Posts
    30

    Question Accessing MDI Form from a Module

    In My VB 6 application, I used a module to set some properties of the controls on the MDI Form. Is it possible in VB.NET??

    How would it get an access to the Form.

    I thought of creating a Form Object using a New() Statement on the MDI Form but then realised that it would just create an object and would not refer to the actual MDI Form.

    Please suggest.

  2. #2
    Addicted Member
    Join Date
    Nov 2003
    Location
    India
    Posts
    227
    Hi,

    In your module function Accept the MDIForm as an argument. While you wan't to control the MDIForm with your module level function you pass the MDI form variable to that function as argument.

    -Jai.
    See you,
    -Jai
    [Friends Never Say Good Bye]

  3. #3
    Addicted Member Sheppe's Avatar
    Join Date
    Sep 2002
    Location
    Kelowna, BC
    Posts
    245
    Just a note - ensure that the variable in the function mentioned above is passed by reference. VB.NET defaults to by value.
    [vbcode]
    On Error Goto Hell
    [/vbcode]
    Sheppe Pharis, MCSD
    Check out http://www.vb-faq.com
    Click here for access to the free Code-Express source code and component sharing network for VB6
    Want a better way to skin your .NET applications? Click here!

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