Hi guys,
What does the owner in show method do and how does it work. Thanks in advance.

FORM.Show([Modal], [Owner])

Recommended Answers

Using the owner argument with the Show method ensures that the dialog box will be minimized when it’s parent is minimized, or unloaded should the parent form be closed.

Using the Show method with both style and owner arguments.

For example:

' Display frmAbout as …
Jump to Post

All 2 Replies

Using the owner argument with the Show method ensures that the dialog box will be minimized when it’s parent is minimized, or unloaded should the parent form be closed.

Using the Show method with both style and owner arguments.

For example:

' Display frmAbout as a modeless child of frmMain.
    frmAbout.Show vbModeless, frmMain

Does it work with MDI forms? i'm receiving error when i run the code. The error says, "Run-time error '5': Invalid procedure call or argument"

This is what i did;
1. I've an MDI form, named "fMainform"
2. Then I have another form, an MDIChild form, named "Form1"
3. on Form1 i have a button and in its event procedure i wrote;

Form2.show vbModeless, Form1
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.