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!

how to resize a picturebox when in play mode?

Status
Not open for further replies.

jacelyn

Programmer
Feb 1, 2001
20
SG
What i want to do is: resize the picture box to a smaller size by click of buttons when the program is in play mode. that mean if the picture show a pair of eyes, when i click the button, the eyes become smaller.

anyway to implement that? What kind of program?

i only find books on how to resize the form, not the other features.

thanx!!!

pls: i am a begginner to vb6.
 
Why not use an image control instead? The image control has a stretch property. By setting the stretch property to true, the image will resize depending on the size of the control.

Check this out:

1. Create a new project
2. Place a command button on the form and an image control
3. Set the Stretch property of the image control to True
4. Assign the image control a picture as you would do in the picture control
5. Then type the code below. (Be sure that the image is somewhat bigger ok?)

Private Sub Command1_Click()
Image1.Width = 250
Image1.Height = 250
End Sub

Tell me when it works. Have fun. jhonArmour
dolphinsoft@hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top