Solved

Minimum form size

Posted on 2002-06-02
4
207 Views
Last Modified: 2010-05-02
I want to be able to set a minimum form size (i.e. if a user tries to size the form smaller than X,Y, the form will not shrink.  I have tried to do this by creating paramters in the form.resize area, but I do not like the shakey snap-back look of the form.  I have seen forms where you cannot drag the outter edge inward past a certain point.  This is what I want.  Can someone help?
0
Comment
Question by:perkster
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 8

Accepted Solution

by:
glass_cookie earned 100 total points
ID: 7050366
Hi1

Here's a file for you over the net:

Download...
http://www.vb-helper.com/HowTo/sizeform.zip
Description: Restrict a form's minimum and maximum width and height (3K)

That's it!

glass cookie : )
0
 
LVL 4

Expert Comment

by:Monchanger
ID: 7050368
Larry Rebich gives a method of accomplishing this task in his site at: http://www.buygold.net/v04n11/v04n11.html

The resize is not perfectly clean - you are able to move the mouse into the "restricted" area when resizing, yet the form's border does not, unlike what I believe you attempted.

This already uses subclassing to accomplish the task. If you need it any cleaner and you might have dig into the API, hooking mousedown event repositioning the mouse cursor.
0
 
LVL 2

Expert Comment

by:corvanderlinden
ID: 7050490
see http://www.vb2themax.com/Item.asp?PageID=TipBank&ID=177

you can also download the MsgHook DLL at that side
0
 

Author Comment

by:perkster
ID: 7054357
Perfect.  Thanks.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question