Click to See Complete Forum and Search --> : NEED HELP NOW
xstopx81
Aug 15th, 2000, 05:37 PM
I want my form's background to contain a pic. The pic i have is too small for the form so i want it to be tiled like some window's background. How do i do this?
samdv
Aug 15th, 2000, 06:09 PM
You can use an API, but you don't need to - just go here:
http://www.vbsquare.com/tips/tip388.html
Hope this helps
Try this:
Private Sub Form_Load()
Form1.ScaleMode = 3
Form1.AutoRedraw = True
Picture1.ScaleMode = 3
Picture1.Visible = False
End Sub
Private Sub Form_Resize()
' Tile bitmap
For y = 0 To Form1.ScaleHeight Step Picture1.ScaleHeight
For x = 0 To Form1.ScaleWidth Step Picture1.ScaleWidth
Form1.PaintPicture Picture1.Picture, x, y
Next x
Next y
End Sub
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.