|
-
November 28th, 1999, 05:05 PM
#1
Tile a picture
Hot to tile a picture as a background in a form like internet brousers?
-
November 28th, 1999, 05:31 PM
#2
Re: Tile a picture
Place an image control (Image1) on your form and assign the image you want tiled to its picture property. Set Image1.Visible to False. In the forms Paint event, call the TileBackground sub. Add the following sub to your form.
Sub TileBackground()
Dim x as Integer, y as Integer, iWidth as Integer, iHeight as Integer
iWidth = Image1.Width
iHeight = Image1.Height
for x = 0 to Width step iWidth
for y = 0 to Height step iHeight
me.PaintPicture Image1.Picture, x, y
next y
next x
End Sub
This works just as well using a picturebox (as a container) instead of a form. Never tried it with a UserControl, but can't imagine why it wouldn't work there as well.
-----
Lee Perkins
TigerBase Technologies
-
November 28th, 1999, 11:54 PM
#3
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
|