Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dynamically create and show a form
Message
 
À
30/12/2005 04:25:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01081944
Message ID:
01082109
Vues:
14
Hi Fabio, thanks for your reply.

I eventually define a subclass of form with ShowWindow=1, as I found it difficult to control the read/clear events if using the SHOW WINDOW approach.

I guess things will be easier if the ShowWindow property can be set at runtime.

>>Hi,
>>
>>I have a form with a custom control (a subclass of ListBox) which will create a form on the fly (to do some editing) with a series of call to ox=CreateObject("form"), ox.addobject("txtName","TextBox"), etc, and then use ox.Show(1) to show it.
>>
>>There is no problem when running in the IDE, but when I built the EXE and run it, that form does not show up at all. Later I found out that form is indeed shown up in the Screen but my application has the Screen made invisible by setting SCREEN=OFF in the config.fpw. FYI all the regular forms in my application have MDIForm=.t.
>>
>>Is there a way to create a form dynamically in that custom control and making the form not showing up in the VFP Screen? Or is there any better way to do it?
>>
>>TIA
>
>You have two ways.
>
>1. move the child form
>
> ox=CreateObject("form")
> ....
> SHOW WINDOW (ox.name) IN (_screen.ActiveForm.Name)
>
>
>2. define a form class "childForm" with
>
>
>  ShowWindow = 1
>
>ox=NEWOBJECT("aliasLib.childForm")
>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform