Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Robot in Visual Basic
Message
 
To
12/02/1999 17:05:47
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00187220
Message ID:
00187962
Views:
20
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
Previous
Reply
Map
View

Click here to load this message in the networking platform