How to resize a Form that needs to have the FormBorderStyle set to "None"???

09-05-2006, 05:27 PM
I need to create a Form without the Max, Min, and Close Buttons, and without the Border as well (FormBorderStyle = None). I need to do it this way in order to mantain consistency in the whole application... However, I need to give the user the option to resize the Form without showing the Border.

I already programmed the code for moving the Form, but I just can't find the way to risize a Form without using the border.

Does anybody know the code that can make me fullfill this requirement?

Thanks in advance!

09-06-2006, 08:51 AM
The only way I can think of (and I'm a web programmer so there probably is another way) is to put a control on your form for resizing. When the user clicks on the control, store the current position of the mouse, as the mouse moves, change the size of the form in code based on the origianl size +/- the movement of the mouse. When the user lets go of the mouse, stop resizing.

09-06-2006, 10:34 AM
I know you said you don't want a border. But, you might consider changing the borderstyle back to sizable. Then change the controlbox to false and the caption to "".

If that is not acceptable, what wayne said might work for you, or consider subclassing for WM_SIZING.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum