Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SHOW/HIDE problems
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00195134
Message ID:
00196163
Views:
44
Tom, your interpretaion was not correct.
You should have an object:
*** main.prg
oApp=createobject("clApp")
***
READ EVENTS
RETURN

DEFINE CLASS clApp as Custom
myform=""
ENDDEFINE
This is normal structure of any VFP app. Again, it does not guarantee that the strange mix of 2.x. and VFP code will work together.

>Thanks, Ed,
>I could not find a way to make a property called myform on any object besides a form. My new code (based on my interpretation of your suggestion below) is:
>
>DO FORM form1 NAME form2.myform LINKED
>
> I also changed, of course, all form1 references to form2.myform.
>
> Everything works (and doesn't work) exactly as before, ie. when I fire it up as a stand alone PRG it works just great. When I fire up the same program from the menu, it flashes through like before.
>
>
>>You don't need to initialize form.name to oApp.myform. Create an object with myform property and just use the command DO Form myform NAME oApp.myform LINKED
>>
>>>Thanks, Ed.
>>> I'm not sure I exactly understand everything you refer to, but I will try creating an object, create a new property called "myform", and then initialize the name of the form in the "myform" property, and then use your LINKED syntax (as shown in your message).
>>> I'll let you know what happens.
>>>
>>>
>>>>Tom,
>>>>Regardless to 2.x stuff, it might give you some ideas about modeless forms flashing when started from menu options. It happens because they get linked to local variable, and when meny procedure is over, the variable gets otu of scope and form dies. The safer way is to start forms linking them to properties of some external objects, oApp in simplified case, e.g. if you start a form
>>>>DO Form myform NAME oApp.myform LINKED
>>>>it should not flash. Try it and see how it goes, again I can't speak by sure about mixed of 2.x and VFP situations.
>>>>
>>>
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform