Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to eliminate the Foxpro desktop in distributed progr
Message
 
 
To
21/10/1998 18:00:15
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00148287
Message ID:
00149152
Views:
32
Harry,

Here's some code I use. It'll help eliminate them having two items in the taskbar for your app.
with _screen
   .Caption = "McFeely's Square Drive Screws"
   .MaxButton = .f.
endwith

set talk off
set status bar off

if ( wexist( "Standard" ) )
   hide window "Standard"
endif
hide window all

_screen.BorderStyle = 2
_screen.LockScreen = .t.

on shutdown do CloseForms  && closes form when main window close is selected

do form OrderDataImporter

with _screen.Forms[1]
   _screen.Caption = .Caption  && copy form title to main window title

   .Top         = 1
   .Left        = 0
   .BorderStyle = 0
   
   * to get rid of form title bar
   .Caption     = ""
   .Closable    = .f.
   .ControlBox  = .f.
   .MaxButton   = .f.
   .MinButton   = .f.
   .Movable     = .f.
   
   * adjust main VFP window to bound the form
   local i
   i = sysmetric( 20 )
   _screen.Width  = .Width
   _screen.Height = .Height + 1 &&- i + 1 && + iif( glRuntime, -i, i ) && iif( ( ! glRuntime ), -i, i )
   _screen.Left   = ( sysmetric( 1 ) - _screen.Width ) / 2
   _screen.Top    = ( sysmetric( 2 ) - _screen.Height ) / 2
   _screen.BackColor = 0
endwith

do ordr.mpr   && put up the menu

if ( file( "ordr.hlp" ) )
   * set help if available
   set help to ordr.hlp
endif

_screen.LockScreen = .f.
>Thanks so much. I have tried all suggestions. The only one that works is yours. Even though I put _screen.visible=.f. at the beginning of program, it doesn't work. So I just change _screen to a a very small size and place it in the centre so that it can be covered by the application window.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform