|
-
Jan 1st, 2000, 11:04 AM
#1
Thread Starter
Lively Member
does anyone have a code that will resize the forms background picture to the size of the form automatically no matter what size the form is?
-
Jan 1st, 2000, 03:37 PM
#2
Addicted Member
try this you need a picture box
Picturebox autosize = true
picturebox visible = false
form1.picture = loadpicture(picture1.picture)
form1.width = picture1.width
form1.height = picture1.height
-
Jan 2nd, 2000, 01:14 AM
#3
Junior Member
You could work around this problem. Instead of trying to resize the picture property of the form you could simply add an image as the first control on your form and resize it as the form is resized....Here's how I'd do it....
1. Start a new project.
2. Add an Image to the form.
3. Set the TOP and LEFT properties to "0". Also change the stretch property to "True".
4.Finally add this code to the Form_Resize()
Private Sub Form_Resize()
Image1.Width = Form1.Width
Image1.Height = Form1.Height
End Sub
That should do it... Also you could change the background property of the form to a color close to the color of the background image (this reduces some static during resize). I know this is a cheap way to do it (and there are probably better ways), but it's only my second week of VB.
Mitchell Hayenga
[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
|