Easy tiled-image form backgrounds
This code, which was inspired by a similar snippet of code by Ian Ippolito, permits tiling an image onto a form's background. This variant, though, resides in a module and is called by a form instead of residing within the form's code itself. This permits using the feature project-wide without redundant code all over the place.
AI
AI Summary: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.
Source Code
Sub TileBkgd(frm As Form, picholder As PictureBox, bkgdfile As String)
If bkgdfile = "" Then Exit Sub
Dim ScWidth%, ScHeight%, ScMode%, n%, o%
ScMode% = frm.ScaleMode
picholder.ScaleMode = 3
frm.ScaleMode = 3
picholder.Picture = LoadPicture(bkgdfile)
picholder.ScaleMode = 3
For n% = 0 To frm.Height Step picholder.ScaleHeight
For o% = 0 To frm.Width Step picholder.ScaleWidth
frm.PaintPicture picholder.Picture, o%, n%
Next o%
Next n%
frm.ScaleMode = ScMode%
picholder.Picture = LoadPicture()
End Sub
Original Comments (3)
Recovered from Wayback Machine