Change Appearance of Form Margins

ElderKnight
01-13-2005, 06:27 AM
Is there a way to subtly change the appearance of selected margins on a form, e.g., to indicate to user that a form is resizable in a certain dimension? Probably an API call.

zelg37
01-15-2005, 12:25 AM
The problem you are probably going to run into is that with most VB forms, to paint over non-client areas (like borders) without resizing-flicker you usually have to subclass.

However, if you want to spent some time pursuing this, you might want to start out with a borderless form that contains code to change the cursors to resizing arrows as they mouseover the edges of the form.

One example of this is:
"Borderless Form Move and Resize"
http://www.freevbcode.com/ShowCode.asp?ID=6278

Then you can add custom graphics to create any sort of a custom border you want.

The following thread contains several attempts to create the slightly different form borders (similiar to those found in Photoshop "pane" toolwindows) as well as using fake (but customizable) titlebars:
http://www.xtremevbtalk.com/t193484.html

Note: Most of the later attachments contain sub-classing code for flicker-free resizing with a set minimum size (which means it's not a good idea to "pause" the programs while running in the VB IDE)

ElderKnight
01-18-2005, 08:59 AM
I appreciate the information. I'm not sure it's worth all the trouble now. (I guess that I can have a label of info saying "You may stretch horizontally") or some such.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum