Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Robot in Visual Basic
Message
 
À
12/02/1999 17:05:47
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00187220
Message ID:
00187962
Vues:
21
Quite simple fact : Form_load is called _before_ Form is loaded to video memory (ie shown to screen). So, even if you fill your label's caption, and call form.refresh, it doesn't work at all.
To solve your problem, put Automation into Form_Activate, called _after_ screen loading... I've searched a lot of time before finding that. In fact we can catch screen events with a Windows messages monitor program to see that a form doesn't exist in memory between the end of the load event and the beginning of Initialize (or Activate) event. WM_REPAINT message is sent immediately after loading.

I've found it trying to set focus onto a textbox in a Form_Load. I got error 91 : object no defined... I was puzzled, and after testing, I realized that Windows needs to load completely a form before we can access its elements.
VB Developer
Servilog Concept
jmb@octalfrance.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform