Windows application resizing if moved in Windows 7

I have an application that is written in Visual Studio 2005 and is configured in the form properties to start maximized. The form size property is set to 1024x768 with that also being the minimum size property. The maximum size property is set to 1280x1024. In XP and Windows 7, the form will start as expected and fill the screen on a display up to 1280x1024. You may grab the top bar on the form and drag the form around, if desired. This works fine in XP, however in Windows 7 the form will snap to the minimum size of 1024x768 if you try to move it. I intentionally do not have any minimize/,maximize button on the top form bar as this is intended to be a kiosk app and not change size. You can move the window to the upper left corner and pull the right and bottom edges out to fill the screen again, at which point the window WILL retain the full size even if you move it.

In addition, when I start maximized in either OS, the window is full screen with the bottom behind and BELOW the task bar instead of at the top of the task bar (truly full screen).
How do I open my window to be full screen size with the bottom sitting on top of the task bar AND not have the size change if moved in Windows 7? Most apps I see will compensate their size if the task bar is change to auto-hide or back to always present.

I'm still relatively green to the .NET programming and just cannot figure these two issues out.
Thanks for any help that can be given!!

John
jboothcoAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

käµfm³d 👽Commented:
Issue 1: I believe this is a feature of Windows 7 (snap-feature). If you take your un-maximized form, resize it, then maximize it, when you grab the title bar and drag the form, it will snap to the un-maximized size.

Issue 2: This is because you are hard-coding the size of the form to the resolution of your screen. 1024x768 does not mean "the size of the screen from top to taskbar." It means "the size of the window from top to bottom (i.e. the size of the glass in your monitor). Try setting the "WindowState" property of your form to "Maximized".

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
JoozefCommented:
Hi John,
1.  You can disable the "docking" feature in Windows 7 by following these instructions:- http://www.winhelponline.com/blog/enable-and-disable-aero-snap-docking-windows-7
2. Use these settings on your form to go "true" full screen:

    * Controlbox = False
    * Text property should be blank
    * WindowState = Maximized
HTH,
Joe
JoozefCommented:
You might also want to set this form property:
TopMost = True
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.