Add shown event to Form class

This commit is contained in:
haru-s 2024-06-29 21:36:26 +09:00
parent 19e9bbd6e8
commit 17156ca25c

View file

@ -2118,6 +2118,7 @@ class Form: ContainerControl, IDialogResult // docmain
}
show();
onShown(EventArgs.empty);
wmodal = true;
for(;;)
@ -2204,6 +2205,8 @@ class Form: ContainerControl, IDialogResult // docmain
Event!(Form, CancelEventArgs) closing; ///
//EventHandler load;
Event!(Form, EventArgs) load; ///
//EventHandler shown;
Event!(Form, EventArgs) shown; ///
///
@ -2248,6 +2251,16 @@ class Form: ContainerControl, IDialogResult // docmain
if(!hwfocus || !IsChild(hwnd, hwfocus))
_selectNextControl(this, null, true, true, true, false);
}
if (isHandleCreated)
onShown(EventArgs.empty);
}
///
protected void onShown(EventArgs ea)
{
shown(this, ea);
}