|
-
Oct 8th, 2021, 03:59 PM
#1
Thread Starter
Fanatic Member
[RESOLVED] Modal and Modeless dialogs
A painful set of questions but I’m hoping someone can answer them.
This is in AutoCAD so maybe it behaves differently.
I’m trying to understand if modal and modeless created forms are duplicated.
And why the creation of each results in different events being triggered.
I define the form when starting the project.
Public FormModal As New frmModal
I show it using
Application.ShowModalDialog(Application.MainWindow.Handle, FormModal, False)
Each time it’s called frmTest_Load and frmTest_Shown are called.
Q1. Does this create a new form each time it’s called?
Q2. Why is frmTest_Load triggered each time if the form is already loaded?
Q3 I can programmatically hide it but if I manually close it does it close instead of hide?
With modeless forms
Application.ShowModelessDialog(FormModeless)
FormModeless.Hide()
frmTest_Load and frmTest_Shown are called for the first load but neither are called the second time.
Q4 Why are frmTest_Load or frmTest_Shown not triggered on the second loading
Last edited by sgrya1; Oct 9th, 2021 at 01:48 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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|