Solved

Minimum form size

Posted on 2002-06-02
4
204 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

919 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now