Tile a Picture on a Form
Tile a Picture on a Form
Rate Tile a Picture on a Form
(1(1 Vote))
Private Sub Command1_click()
On Error Resume Next
Me.Width = Screen.Width
Me.Height = Screen.Height
Me.Left = 0
Me.Top = 0
On Error GoTo ErrHandler
kembali:
On Error GoTo ErrHandler
Dim xFileName As Variant
xFileName = InputBox("Picture File Location ? (BMP,JPG,GIF,ICO)", , "C:\Tes.bmp")
If xFileName = "" Then Exit Sub
If Dir(xFileName) = "" Then MsgBox "Not Valid File Name !": GoTo kembali
Me.AutoRedraw = True
Picture1.AutoSize = True
Picture1.Visible = False
Picture1.Picture = LoadPicture(xFileName)
For a = 0 To Me.Width Step Picture1.Width
For b = 0 To Me.Height Step Picture1.Height
Me.PaintPicture Picture1, a, b
Next
Next
MsgBox "Done !"
Exit Sub
ErrHandler:
MsgBox Err.Description
End Sub
Tile a Picture on a Form Comments
No comments yet — be the first to post one!
Post a Comment