Find Code:
All Words
Any of the Words
Exact Phrase
Home
:
Code
:
Forums
:
Submit
:
Mailing List
:
About
:
Contact
Code
All
VB.NET
ASP.NET
C#
VB Classic
ASP Classic
Snippets
Popular
Resources
Submit Code
Forums
Articles
Tips
Links
Books
Contest
Link to us
Function which fill forms with some little picture...
Author:
Gilles Manouvrier
E-mail:
Click to e-mail author
Submitted:
11/21/2000
Version:
VB5
Compatibility:
VB5, VB6
Category:
Forms
Views:
8964
Function which fill forms with some little pictures (like the background image of a HTML Document). insert this code in a module and call from form_load. pic is the picture path and ctl is the form.
Declarations:
'none
Code:
Public Sub BackPicture(Ctl As VB.Form, ByVal pic As String) 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
Home
|
Forums
|
Submit
|
Books
|
Mailing List
|
Advertising
|
About
|
Contact
© 2024 A1VBCode. All rights reserved.
Legal disclaimer & terms of use
Privacy statement