October 21, 2018
Hot Topics:

VB Coding Tip: Tiling an Image Across a Form

  • November 19, 2002
  • By Sam Huggill
  • Send Email »
  • More Articles »
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 

Comment and Contribute


(Maximum characters: 1200). You have characters left.



Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

By submitting your information, you agree that developer.com may send you developer offers via email, phone and text message, as well as email offers about other products and services that developer believes may be of interest to you. developer will process your information in accordance with the Quinstreet Privacy Policy.


Thanks for your registration, follow us on our social networks to keep up-to-date