Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
.ShowWindow value changes when created
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00169406
Message ID:
00169455
Views:
15
>>>>What if you move this to Topform.Activate event?
>>>
>>>Thanks Ed, this worked perfectly. Is the reason it wasn't working in the .Init(), because at that point the TopLevelForm doesn't actually exist yet?
>>
>
>You have to take care with code in Activate Event. This events is executed each time the form is activated. I mean you have to be carefully when you call another form from this one. For Example a Messagebox, when you close the messagebox Activate Event is fired again.

True. I handle this by having a custom property called mlFirstActivate=.T. In .Activate() event I would have:
IF ThisForm.mlFirstActivate
     ThisForm.mlFirstActivate=.F.
     
     .....stuff I want to occur.....

ENDIF
Colin Magee
Team Leader, Systems Development
Metroland Media Group Ltd.
Mississauga, Ontario, Canada

cmagee@metroland.com

Never mistake having a career with having a life.
Previous
Reply
Map
View

Click here to load this message in the networking platform