VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Tile a Picture on a Form

by Teguh (1 Submission)
Category: Graphics
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Thu 30th November 2006
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Tile a Picture on a Form

Rate Tile a Picture on a Form



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



Download this snippet    Add to My Saved Code

Tile a Picture on a Form Comments

No comments have been posted about Tile a Picture on a Form. Why not be the first to post a comment about Tile a Picture on a Form.

Post your comment

Subject:
Message:
0/1000 characters