Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Making top level form active
Message
De
01/04/2003 13:59:57
 
 
À
01/04/2003 13:54:45
Larry Huisingh
Lockheed Martin Information Technology
Richland, Washington, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00768739
Message ID:
00772589
Vues:
28
>>>>>>>I have a single form called from a PRG. It is set up as a top level form. I also set _SCREEN.Visible=.f. at the top of my PRG. The problem is that when I run the executable I create I see the form (with no desktop, as desired) but I have to click on the screen to make it active. I have mostly done FPW apps so I'm not that fluent in the basics of VFP 6. What do I need to add to make the form active?
>>>>>>
>>>>>>I heavily work with SDI forms and never had this problem. However I don't do that the way you do. I think your problem is using :
>>>>>>_screen.visible = .f.
>>>>>>
>>>>>>What I do is to have a config.fpw with :
>>>>>>screen = off
>>>>>>
>>>>>>Cetin
>>>>>
>>>>>I thought of that and tried it but I have more than one program in the same directory. I don't want all apps to have the screen invisible. That's why I put it in the code.
>>>>>
>>>>>I wound up putting the code in the screen's Activate event code.
>>>>
>>>>You could then create a special config.fpw only for that one. ie:
>>>>*config.spc
>>>>screen=off
>>>>
>>>>myexe -cconfig.spc
>>>>
>>>>Cetin
>>>
>>>I thought of that too but the user usually winds up just double-clicking the executable in Windows Explorer. We can't count on the user using a particular shortcut. Thanks for the suggestion, though.
>>
>>Then build that particular CONFIG.FPW into the .EXE. That way, only that .EXE has that behavior.
>
>I didn't realize you could build a CONFIG.FPW file into the .EXE. Is there anything special you have to do for your app to use that file other than include it in the project? Does the app know to look there for the CONFIG data?

What I do is create a separate folder under the project with a CONFIG.FPW containing just the settings that particular .EXE will need. Then you add the CONFIG.FPW to your project under the Other tab, Other Files. Rebuild your .EXE and it will now use the info in the embedded CONFIG.FPW when that .EXE is run from Explorer or otherwise activated directly from Windows.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform