Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Custom Control Resizing with mulitple VB Controls

Status
Not open for further replies.

DarkMercenary44

Technical User
May 19, 2000
55
US
I'm in need of help bad. I'm creating a custom list box that will be made up out of 2 pictureboxes, pic1 is the outside box [the container for all the controls], pic2 is the actuall list box area, then I have a label placed in pic2, and a VScroll1 placed in pic1. What I want to know is how the heck do I make it so that when the user resizes my control how do I make the other controls follow suite. And One more question, how do I convert pixels to twips, the height of a label control is in pixels, but i need to use the label height in twips later on in the code. Any Help will be greatly appreciated DarkMercenary
darkmercenary44@earthlink.net

In the real world
As in dreams
Nothing is quite
What it seems
:Book of Counted Sorrows
 
Use the resize event of the control to set the size of other control on your UserControl.

Private Sub UserControl_Resize()
Picture1.Height = UserControl.Height
End Sub


Simon
 
Use the controls TwipsPerPixelX or TwipsPerPixelY property to convert between units.
 
Thanks, that gave me just the right amount of info DarkMercenary
darkmercenary44@earthlink.net

In the real world
As in dreams
Nothing is quite
What it seems
:Book of Counted Sorrows
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top