Tile With Lightweight Image Control Arrays

Tile With Lightweight Image Control Arrays

I write apps for companies where computer know-how is at an all-time low. Most applications scare people to death. However, Web-style forms and graphic buttons present soothing enough interfaces that they can be inviting to users.

I wanted my forms to look just like a Web page, so I devised a method to replicate and tile one Image control across a form. To achieve this effect, add an Image control to your form, set its Index to zero, set Visible to False, and set an appropriate background image for the Picture property. Pass your form to the CreateBackground routine during its Load event:

 Private Sub Form_Load()	Call CreateBackground(Me)End SubPublic Sub CreateBackground(frmCallingParent)	Dim lTilesY As Long, lTilesX As Long	Dim lLeft As Long, lTop As Long	Dim oImg As Image	Dim X As Integer	Set oImg = frmCallingParent.Image1(0)	lTilesX = oImg.Width	lTilesY = oImg.Height	Do While lTop  Screen.Width Then			lLeft = 0			lTop = lTop + lTilesY		End If	LoopEnd Sub


Share the Post: