Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding images at run time
Message
From
31/12/2004 20:16:05
 
 
To
31/12/2004 19:45:07
General information
Forum:
ASP.NET
Category:
Forms
Miscellaneous
Thread ID:
00973599
Message ID:
00973601
Views:
12
>I have an undefined number of images I need to load at run time on my form in VB.NET. How can I do this from code?

Ok, the following at load time does it:
        Dim loControl As System.Windows.Forms.PictureBox

        ' Initialize the list of all Web servers
        For lnCounter = 1 To lnNumberOfWebServer
            ...
            loControl = New System.Windows.Forms.PictureBox
            loControl.Image = Image.FromFile(lcStartupDirectory + "..\Images\Green.gif")
            loControl.Location = New System.Drawing.Point(300, 632)
            loControl.Size = New System.Drawing.Size(10, 10)
            loControl.Name = "WebServerImage" + Trim(Str(lnCounter))
            loControl.Visible = True
            Controls.Add(loControl)
        Next
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Reply
Map
View

Click here to load this message in the networking platform