Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Get name of the form in LOAD method?
Message
 
 
To
22/01/2013 03:12:50
Thomas Ganss (Online)
Main Trend
Frankfurt, Germany
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01563533
Message ID:
01563600
Views:
51
I still call this function from the Load method but decided that "tracking" where the call came from is not as important as to know which work station had the problem. Therefore it is not that important to know the name of the form where the call initiated.
Thank you.

>I can see your reason for calling the function in the load.
>But as Load runs before most of the form is there Tore's hint would have been mine as well.
>Further Hint: you can set a property in the load which then triggers the log in the init ;-)
>Sounds overly complicated, but makes sense in the way that in init you might decide to cancel the form if Load failed.
>
>>This code in INIT would be "too late". But if you see my reply to myself you will see that I have changed my mind. I no longer care about the form name but rather the work stations name/ip that has this problem.
>>
>>>If I remember correctly, the form's name is not yet available with _screen.activeform.name. However, if you move this code to Init, I think it is.
>>>
>>>>I created a function that checks for good SQL Server connection. I call this function from LOAD method of a form class. If the connection is bad, I would like to store in the "log" file which form had a problem.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Reply
Map
View

Click here to load this message in the networking platform