Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding images at run time
Message
De
31/12/2004 20:16:05
 
 
À
31/12/2004 19:45:07
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Divers
Thread ID:
00973599
Message ID:
00973601
Vues:
13
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform