|
-
November 21st, 1999, 07:54 AM
#1
centering a picture
Does anyone know how to center a picture on a form every time it changes size? I could tell it the left and top every time but that would be incredibly tedious. At the moment I have 'next' and 'previous' that change the picture in the frame but each pic is a different size. Any help would be appreciated!
-
November 23rd, 1999, 01:16 PM
#2
Re: centering a picture
Set the Picturebox AutoSize Property to True, then in the Picturebox Resize Event, place the code to center it on the Form, eg.
private Sub Picture1_Resize()
DoEvents
Picture1.Move (ScaleWidth - Picture1.Width)/2, (ScaleHeight - Picture1.Height)/2
End Sub
Aaron Young
Analyst Programmer
[email protected]
[email protected]
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
|