Question Window.Size Normal

ALX

Well-known member
Joined
Nov 16, 2005
Messages
253
Location
Columbia, SC
Programming Experience
10+
How can I determine the "normal" window size while the form is maximized ?
 
Thanks John: So are you saying I'll need to use C++ to accomplish this?

Possibly, a better question is: How can I differentiate between a normal Window Resize event and a Window Maximize event ? They both fire a resize event and I need to know which one it is. I have multiple forms. One begets another and so on. When any of these forms get resized or maximized, that info needs to be passed to the parent and to daughter forms. If the user maximizes the form, that size info will not tell me what the NORMAL window size was.
 
Last edited:
Thanks John: So are you saying I'll need to use C++ to accomplish this?

No, he's saying that you will need to invoke that Windows API function in your VB code. You must first declare a VB function that maps to that Windows API function and then you call that VB function. The declaration can be done in two different ways. You can use the old VB6 way and use the `Declare` keyword or you can use the .NET way and apply the `DllImport` attribute.

You should do it the second way. That technique is known as Platform Invoke or pinvoke for short. You can find many .NET method signatures to use with pinvoke at pinvoke.net: the interop wiki!.
 
Possibly, a better question is: How can I differentiate between a normal Window Resize event and a Window Maximize event ? They both fire a resize event and I need to know which one it is. I have multiple forms. One begets another and so on. When any of these forms get resized or maximized, that info needs to be passed to the parent and to daughter forms. If the user maximizes the form, that size info will not tell me what the NORMAL window size was.
You can check WindowState in Resize event.
 
Back
Top