Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
 
 
 
500MB 27GB Web Hosting - $9.95/Month
 
 
 
 
 
Old Pages
 
Old Index
Site Map
What's New
 
Books
How To
Tips & Tricks
Tutorials
Stories
Performance
Essays
Links
Q & A
New in VB6
Free Stuff
Pictures
 
 
 
TitleTile a form with an image
Keywordsform, tile, background
CategoriesTips and Tricks, Graphics
 
In the Form_Paint event handler, use PaintPicture to copy the image in a PictureBox onto the form repeatedly until the form is full.
 
Private Sub Form_Paint()
Dim wid As Single
Dim hgt As Single
Dim x As Single
Dim y As Single

    wid = Picture1.ScaleWidth
    hgt = Picture1.ScaleHeight
    y = 0
    Do While y < ScaleHeight
        x = 0
        Do While x < ScaleWidth
            PaintPicture Picture1.Picture, _
                x, y, wid, hgt
            x = x + wid
        Loop
        y = y + hgt
    Loop
End Sub
 
 
Copyright © 1997-2003 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated