Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Proper way to evaluate
Message
 
À
31/12/2004 20:31:27
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
00973604
Message ID:
00973657
Vues:
15
You could store your images into let's say a Hashtable:
Hashtable Hashtable1 = new(Hashtable);

// Store your images
counter++;
Hashtable1["WebserverImage" + counter.ToString()] = someImage;
counter++;
Hashtable1["WebserverImage" + counter.ToString()] = someImage;

//retreive this images
Image image = (Image)Hashtable1["WebserverImage" + counter.ToString()];
>I need some kind of evaluation approach in VB.NET. I have some code which runs in a loop. For each occurence of the loop, there is a corresponding object on the form. Those are images. So, they are WebServerImage1, WebServerImage2, ...
>
>The issue is how to make a reference to the related object from the loop?
>
>Lets say I have this code:
>
>
>        For lnCounter = 1 To lnNumberOfServer
>            'WebServerImage1.Image = Image.FromFile(lcStartupDirectory + "..\Images\Green.gif")
>        Next
>
>
>The line should be dynamic to lnCounter. So, something like:
>
>
>"WebServerImage" + Trim(Str(lnCounter)+".Image=..."
>
>
>is required.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform