Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I call a Method from outside the Form
Message
From
14/03/2005 06:59:40
 
 
To
13/03/2005 22:59:52
Freddie Rodrigues
Bitrun Business Solutions
Mumbai, India
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00995365
Message ID:
00995423
Views:
17
To be more precise. I am working on a Form called uditempl.scx. This Form has a method called [colourgridcheck]. On running the Form, the [Valid Method] of one of the Grids in uditempl.scx calls a class.
>
>Here's where I am stuck.
>
>This class has to call the method [colourgridcheck] which is in the calling Form uditempl.scx. The code of the class is in the main [calling] prg file.
>
>The answer to the query may be in the earlier advice you have provided. But I was unable to catch up.


Hilmar has given you a good example of how to call a method in another form. Another idea, if you have a method or portion of code that is reusable, is to extract it from the form and put it outside, maybe in a utility class (like oAPP) or maybe in a separate PRG. This way you can call this routine from both forms, instead of having to have one form depend on another.

HTH


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform