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?
Printable View
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?
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:
Code: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