VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Auto resize that works

Chris Bradford  (2 Submissions)   Miscellaneous   Visual Basic 3.0   Intermediate   Wed 3rd February 2021

I needed a *good* auto resizer to minimize the time spent on resize code. I tried a few auto resizers, but none of them worked the way I wanted. So, I threw together this little piece of code. Unlike other resizers making assumptions on how to resize your controls, this code makes no assumptions. You the programmer are in total control of the resize behavior of each control on the form. IMPORTANT NOTES BELOW!

Assumes
IMPORTANT!! This code needs the tag property of your controls. If your tag properties are in use, then you'll have to devise with another method. For each control, set its tag property to the code for its resize behavior. Codes: sX = Stretch on X axis sY = Stretch on Y axis sXY = Stretch on Both axis rY = Move relative to Y axis rX = Move relative to X axis rXY = Move relative to XY axis More notes in the code!

Side Effects
Works for most resizing... may not function properly with OLE objects, but its not a big deal.

API Declarations
Public Type CtlAdj
adjX As Long
adjY As Long
End Type

Rate Auto resize that works (5(5 Vote))
Auto resize that works.bas

Auto resize that works Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters