by gilles manouvrier (3 Submissions)
Category: Custom Controls/Forms/Menus
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Tue 21st November 2000
Date Added: Mon 8th February 2021
Rating: (1 Votes)
a function to fill your forms with pictures (like a HTML background image) Put this code in a module and insert the function inn the
Dim img() As VB.Image
ReDim Preserve img(1)
Set img(0) = Ctl.Controls.Add("VB.image", "img")
img(0).Picture = LoadPicture(pic)
hmax = Screen.Width / img(0).Width + 2
vmax = Screen.Height / img(0).Height + 2
For l = 1 To vmax
For h = 1 To hmax
cpt = cpt + 1
'Load img(cpt)
ReDim Preserve img(cpt)
Set img(cpt) = Ctl.Controls.Add("VB.image", "img" & cpt)
With img(cpt)
.Visible = True
.Picture = img(0).Picture
.Top = l * .Height - (.Height)
.Left = h * .Width - (.Width)
End With
Next
Next
End Sub
No comments have been posted about a function to fill your forms with pictures (like a HTML background image) Put this code in a modul. Why not be the first to post a comment about a function to fill your forms with pictures (like a HTML background image) Put this code in a modul.