WindowState of a form

  • Thread starter Thread starter Martin
  • Start date Start date
M

Martin

Hi,
I write code to resize controls corresp. to Form_resize.
When the form is minimized, the controls will not be resized.
But I don't know, how I can retrieve the windowstate of a form, when it is
mininmized or maximized or normally resized.

Thanks for help
Martins
 
Hi Martin

You can declare a couple of API functions as follows:

Public Declare Function IsMaximized Lib "user32" _
Alias "IsZoomed" _
(ByVal hWnd As Long) _
As Long

Public Declare Function IsMinimized Lib "user32" _
Alias "IsIconic" _
(ByVal hWnd As Long) _
As Long

To use:
If IsMaximized(Me.hWnd) then...
 
Thanks

Graham Mandeno said:
Hi Martin

You can declare a couple of API functions as follows:

Public Declare Function IsMaximized Lib "user32" _
Alias "IsZoomed" _
(ByVal hWnd As Long) _
As Long

Public Declare Function IsMinimized Lib "user32" _
Alias "IsIconic" _
(ByVal hWnd As Long) _
As Long

To use:
If IsMaximized(Me.hWnd) then...

--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand


Martin said:
Hi,
I write code to resize controls corresp. to Form_resize.
When the form is minimized, the controls will not be resized.
But I don't know, how I can retrieve the windowstate of a form, when it is
mininmized or maximized or normally resized.

Thanks for help
Martins
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Form_Resize & Minimize 1
subform resize??? 4
AFTER form resize event? 3
Missing WindowState Property 1
WindowState maximized question? 2
Form resize event 4
MDI child forms 1
OnResize event for Access Window? 1

Back
Top