quote:
Originally posted by Mike
The variable "vbModeless" is actually unknown in VB, and I guess you get a compile error saying "Variable Not Defined" when trying to compile your plugin.
No, vbModeless _does_ exist and is a perfect valid constant...
Show parameters:
Constant Value Description
vbModal 1 Modal form
vbModeless 0 Modeless form
See VB help files, or
MSDN Library: Form constants
quote:
Originally posted by Mike
Anyway, if you want to show a "modeless" form, you don't have to put "vbModel".
Indeed you don't, as "Modeless" is the opposite of "Modal". It would be wrong to put "vbModeless" if you mean "vbModal" (or vice versa)
quote:
Originally posted by Matty
(...) And 1 is vbModal, showing ontop of all other windows.
Although it indeed shows on top of other windows, that isn't exactly the true meaning of it.
Modal vs. Modeless:
The definition of a modal form is that it must be closed (hidden or unloaded) before you can continue working with the rest of the application (hence it is also shown on top; but this is rather a "side effect" so to speak). For example, a dialog box is modal if it requires you to click OK or Cancel before you can switch to another form or dialog box.
Modeless dialog boxes let you shift the focus between the dialog box and another form without having to close the dialog box. You can continue to work elsewhere in the current application while the dialog box is displayed. Modeless dialog boxes are rare. From the Edit menu, the Find dialog box in Visual Basic is an example of a modeless dialog box.
(snipped taken from the MSDN library)
----------------------
From the MSDN Library:
PRB: Modeless Forms in VB ActiveX DLL's Don't Display in VC++ Clients
INFO: Non-Modal Form Support in Visual Basic DLLs
----------------------
did I ever mention you can find everything on the MSDN library? No? hmmm... well... you can find everything on the MSDN library )