Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Createobject('myform') - form flashes breifly
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00710557
Message ID:
00710566
Views:
11
>Hi - have a strange problem. I am running VFP6 SP5 Win XP Prof.
>
>I create a top level form in my start up prog followed by a read events - the form appears OK. In the init of the form I call a top level menu - this also appears OK. In my menu I want to call other forms etc - if I use do form myform - it shows OK but if I use frmForm = createobject('myform') - frmForm.show() the form show very briefly then disappears - any ideas?
>
Hi Chris.

The local variable (frmForm) goes out of scope as soon as the menu option code ends, so the form is destroyed. You should either:
  • assign the reference to a property (array?) of the main form, and remember releasing it in the form's Unload event

  • using Show(1) - that means Modal, and everything else is disabled till you close the form

  • issuing DO FORM .. as you already tried


  • HTH and bye
    Jose.
    ------------------
    Jose Marcenaro
    Tercer Planeta - Argentina
    http://www.tercerplaneta.com
    Previous
    Next
    Reply
    Map
    View

    Click here to load this message in the networking platform