Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dim lstWiz As ListBox
Message
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00486763
Message ID:
00486772
Vues:
6
>At the risk of sounding newbie, why is this bad?
>
>
Private Sub Form_Load()
>Dim lstWiz As ListBox
>    with lstWiz
>        .Visible = True
>        .Enabled = True
>        .Left = 100
>        .Top = 100
>        .Height = 3000
>    end with
>End Sub
>
>I appreciate the info. I need sleepies now. :) TTYT,

Because this doesn't create a visual instance.

See this article to see how to add controls to a form:
http://support.microsoft.com/support/kb/articles/Q190/6/70.ASP

If a listbox control already exist at design time, a simpler way of adding instance is to set the Index property to 0 and use the Load lstWiz(x) syntax.
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform