Microsoft & .NETVisual BasicVB Coding Tip: Tiling an Image Across a Form

VB Coding Tip: Tiling an Image Across a Form

Private Sub Form_Paint()
Dim X As Integer, Y As Integer
Dim ImgWidth As Integer
Dim ImgHeight As Integer
Dim FrmWidth As Integer
Dim FrmHeight As Integer
ImgWidth = Image1.Width
ImgHeight = Image1.Height
FrmWidth = Form1.Width
FrmHeight = Form1.Height
For X = 0 To FrmWidth Step ImgWidth
For Y = 0 To FrmHeight Step ImgHeight
PaintPicture Image1, X, Y
Next Y
Next X
End Sub 
Get the Free Newsletter!
Subscribe to Developer Insider for top news, trends & analysis
This email address is invalid.
Get the Free Newsletter!
Subscribe to Developer Insider for top news, trends & analysis
This email address is invalid.

Latest Posts

Related Stories