WindowState of a form

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
 
G

Graham Mandeno

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...
 
M

Martin

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


Top