Solved

Minimum form size

Posted on 2002-06-02
4
203 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Perfect.  Thanks.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

763 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

13 Experts available now in Live!

Get 1:1 Help Now