Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Stefan Wuebbe
  Where is Stefan Wuebbe?
 Stefan Wuebbe
 To: Bob Lawson
  Where is Bob Lawson?
 Oakville, Ontario
 Bob Lawson
Subject: RE: Form as the desktop
Thread ID: 345499 Message ID: 345533 # Views: 83 # Ratings: 1
Version: Visual FoxPro 9 SP2 Category: Forms
Date: Thursday, May 24, 2012 7:16:21 AM         

> I am having a problem in an application that has a single form as the desktop.
> I have it setup so that when the application is run it displays the one form. When the person exits the form the application exists as well.
> When running in the IDE it displays the form and the IDE desktop disappears. The form runs fine and when I close the form the IDE is closed as well. All seems to work as I want.
> However when I package the application as an APP and run it on a target winXP it complains it can not find a file but the file path is wrong.
> I put in some messageboxes but none of them displays anything which gets me wondering.
> When you have a form as the desktop does the 'MAIN' program for the application still run?

Yes, the "main.PRG" would still be running, that is the project member which is being displayed in bold letters, "set as main" in the Project manager (and also the _screen object would always be available at run-time, independent of its visibility).

> Are there any special considerations required for this configuration?

Not much I'd say, except form.ShowWindow (probably ShowWindow=0 for the main form if _screen.Visible=.T.; ShowWindow=2 if _screen.Visible=.F.; and ShowWindow=1 for secondary forms if mainform.ShowWindow=2 and _screen.Visible.F.)
And if there is no modal form being started automatically, there would need to be a "Read Events" line, probbaly in "main.PRG".

Your description sounds more like a "SET" environment issue to me - since personal preferences that may have been stored in Tools->Options do not apply at run-time outside the IDE, your code would need to care itself, say for example take care for Set("Path"), CurDir(), Set("Exclusive"), Set("Date") and so on - each of these would have its Default value at run-time as long as your code (or your config.FPW) does not explicitly set different settings.



Form as the desktop Posted by Bob Lawson @ 5/23/2012 11:46:22 PM
RE: Form as the desktop Posted by Stefan Wuebbe @ 5/24/2012 7:16:21 AM
RE: Form as the desktop Posted by Cetin Basoz @ 5/24/2012 1:56:54 PM