Resize Form in One Direction Only 
Author Message
 Resize Form in One Direction Only

Hi..

I have been trying this problem out but cant seem to work out a way.
Is there a possible way of restricting a user to Resize the form either
Vertically or Horizontally at a time but not both at the same time?

Regards,
DP



Thu, 24 Jul 2003 20:30:42 GMT  
 Resize Form in One Direction Only

Quote:
>Is there a possible way of restricting a user to Resize the form either
>Vertically or Horizontally at a time but not both at the same time?

I believe you can do this by subclassing your Form and handle the
WM_SIZING messages.

Matt

====================================

http://www.msjogren.net/dotnet/

CodeHound - The Software Developer's Search Engine
http://www.codehound.com



Thu, 24 Jul 2003 21:09:44 GMT  
 Resize Form in One Direction Only
DP ...

You have to subclass the form and trap the WM_GETMINMAXINFO message. There
you are free to set the MINMAXINFO structure values to those you want.
Please see Subclassing Form Messages: Restricting Form Resizing  at
http://www.mvps.org/vbnet/code/subclass/minmaxinfo.htm

--

Randy Birch
MVP Visual Basic

Take the vb.net poll at:
http://www.mvps.org/vbnet/
http://www.mvps.org/ccrp/

Please respond only to the newsgroups so all can benefit.


: Hi..
:
: I have been trying this problem out but cant seem to work out a way.
: Is there a possible way of restricting a user to Resize the form either
: Vertically or Horizontally at a time but not both at the same time?
:
: Regards,
: DP
:
:



Fri, 25 Jul 2003 00:47:42 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Resizing a form only in one direction

2. Resize in one direction only?

3. Closing one form from another and resizing the entire form at runtime

4. my vb5 app only talks one direction with ms word

5. Resizing Everything when Form Resizes

6. Resizing an object when a form is resized.....

7. resizing a form when a control resizes during execution

8. Resizing components after form resize

9. Resize form - resize controls

10. Correction: Resize form - resize controls

11. resizing DataGrid after resizing Form

12. Resizing a control when the Form is resized

 

 
Powered by phpBB® Forum Software