Minimise application with popup and modal forms (API) 
Author Message
 Minimise application with popup and modal forms (API)

I realise this topic was discussed not too long ago, but did anyone
ever come up with an answer to this.  I have a database application
that uses popup and modal forms for users to navigate through the
system.  Is there a way to minimise the application while one of these
popup forms is open?

Richard



Sat, 25 May 2002 03:00:00 GMT  
 Minimise application with popup and modal forms (API)
Well, the code for this has to be called from the Modal form itself, or
through another form's Timer event because of the form's modality; but the
API call itself is pretty straight forward.

' ****** Code Start ********
Private Declare Function apiShowWindow _
    Lib "user32" Alias "ShowWindow" _
    (ByVal hWnd As Long, _
    ByVal nCmdShow As Long) _
    As Long

' ShowWindow() Commands
Private Const SW_HIDE = 0
Private Const SW_SHOWNORMAL = 1
Private Const SW_NORMAL = 1
Private Const SW_SHOWMINIMIZED = 2
Private Const SW_SHOWMAXIMIZED = 3
Private Const SW_MAXIMIZE = 3
Private Const SW_SHOWNOACTIVATE = 4
Private Const SW_SHOW = 5
Private Const SW_MINIMIZE = 6
Private Const SW_SHOWMINNOACTIVE = 7
Private Const SW_SHOWNA = 8
Private Const SW_RESTORE = 9
Private Const SW_SHOWDEFAULT = 10
Private Const SW_MAX = 10

Private Sub Command0_Click()
    Call apiShowWindow(hWndAccessApp, SW_SHOWMINIMIZED)
End Sub

' ******** Code End ***********

 -- Dev

: I realise this topic was discussed not too long ago, but did anyone
: ever come up with an answer to this.  I have a database application
: that uses popup and modal forms for users to navigate through the
: system.  Is there a way to minimise the application while one of these
: popup forms is open?
:
: Richard
:
:



Sat, 25 May 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. minimise and maximise chain of modal forms

2. cant Minimise the form when you right click on status bar to minimise

3. Popup menus and modal forms

4. modal forms and popup menus

5. Second PopUp in modal form

6. Popup Menu on a modal form?

7. Popup Menu's and Modal Forms

8. Resizing a dialog (modal popup) form - Possible ?

9. Problem with draw order after calling modal a modal from from a modal form

10. MODAL FORM & NON MODAL FORM

11. Unloading modal owner form also unloads modal form?

12. Modal Form with Modal form using Control?

 

 
Powered by phpBB® Forum Software