|
-
Nov 30th, 1999, 07:32 AM
#1
this is a stupid question but ill ask anyway. how do i make the form "wrap" around my picture box when i resize it during runtime?
for example: if i press a button that will randomly change the size of the picture box, and the form will resize also to be the same size as the picture box.
i have tried
form1.width = picture1.width
or even
form1.width = picture1.scalewidth
or anything similar to that but it makes it a little smaller then the picturebox so the picture gets "clipped".
so again how would i do this? also i dont want it to be exactly the same size, i want to be just a little bigger so it leaves a border around the picturebox.
thanx ahead of time
-
Nov 30th, 1999, 07:46 AM
#2
Addicted Member
Try this ... might work. Where BorderSize is however big you want that border.
Private Sub Picture1_Resize()
Dim BorderSize as Integer
BorderSize = 50
Form1.ScaleWidth = Picture1.ScaleWidth + (2 * BorderSize)
Form1.ScaleHeight = Picture1.ScaleHeight + (2 * BorderSize)
Picture1.Move BorderSize, BorderSize
End Sub
------------------
Micah Carrick
Ordinary joe, only not named joe.
http://micah.carrick.com
[email protected]
ICQ: 53480225
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|