Good day!

I just need some help/solution on how to prevent the user to resize the form when the width of the form is less than 8,220.

Thank you guys for giving time.

God bless

Recommended Answers

All 2 Replies

A couple of different ways...

Hooking like this example... http://vbnet.mvps.org/index.html?code/subclass/aspectratio.htm which you would have to modify to fit your needs

or like this example http://vbaccelerator.com/home/VB/Code/Libraries/Subclassing/SSubTimer/VB6_Minimum_Form_Size_Demonstration.asp

and I though there was an example around the web using the SetWindowRgn API but I can't seem to find it now...

And finally you could use the forms resize event to force/keep the minimum size...

If Me.Width < SomeValue Then Me.Width = SomeValue

However, you will notice that this last method gives you some undesirable redrawing artifacts.

Good Luck

A couple of different ways...

Hooking like this example... http://vbnet.mvps.org/index.html?code/subclass/aspectratio.htm which you would have to modify to fit your needs

or like this example http://vbaccelerator.com/home/VB/Code/Libraries/Subclassing/SSubTimer/VB6_Minimum_Form_Size_Demonstration.asp

and I though there was an example around the web using the SetWindowRgn API but I can't seem to find it now...

And finally you could use the forms resize event to force/keep the minimum size...

If Me.Width < SomeValue Then Me.Width = SomeValue

However, you will notice that this last method gives you some undesirable redrawing artifacts.

Good Luck

i haven't tested this yet. but i know this will solve the problem

thank you guys.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.