I have a really cool Icon that is in an image control.
Is it possible to tile that one image across my entire form?
Printable View
I have a really cool Icon that is in an image control.
Is it possible to tile that one image across my entire form?
Yes! Create the control array of image control and then position each element accordingly...
I can give u a hint
VB Code:
Dim xCount As Long Dim yCount As Long Dim imgIndex As Long Private Sub Form_Load() xCount = Me.Width\Image1(0).Width + 1 yCount = Me.Height\Image1(0).Height +1 ImgIndex = 1 For Y = 1 To yCount For X = 1 To xCount Load Image1(imgIndex) 'Here you position them accordingly Next X Next Y End Sub
VB Code:
Private Sub Form_Load() Dim tx As Integer Dim ty As Integer Dim tw As Integer Dim th As Integer Dim pw As Long Dim ph As Long Form1.AutoRedraw = True tw = Int(Form1.Width / Image1.Width) + 1 th = Int(Form1.Height / Image1.Height) + 1 pw = Image1.Width ph = Image1.Height For tx = 0 To tw For ty = 0 To th Form1.PaintPicture Image1.Picture, tx * pw, ty * ph Next Next Form1.AutoRedraw = False Image1.Visible = False End Sub