>Hi,
>
>Does anyone know how to disable the main screen of your VFP application (exe)? The one the has a white background.
>
>
>Any help would be greatly appreciated.
>
>thank you!
Alfred,
Don't be too quick doing it. It's harder to manage environments w/o VFP main window (I'm saying for sure because I have a big application doing that and already know the suffers, though all have workarounds).
Having said that:
-In your config.fpw have SCREEN=OFF
-Your forms then need to ShowWindow=2 && As top level
-Any modal forms need to have ShowWindow=1 && In top level
If ShowWindow=2 and WIndowType=1 && Modal is ignored and form is modeless
-Reports would be problematic. Here is a rough sample to manage them:
Define Window Output From 1,1 To Scols(),Srows() System Name oOUTPUT Close Zoom
With oOUTPUT
.Icon = "bitmaps\myAppIcon.ico"
.Caption = "myReport's caption"
.MaxButton = .T.
.WindowState = 2
.Show()
Endwith
_Screen.TitleBar= 0
_Screen.Visible = .T.
_screen.WindowState = 2
Report Form (m.cRepName) Preview Window 'OutPut'
_Screen.Visible = .F.
If Vartype(oOUTPUT) = 'O'
oOUTPUT.Release()
Endif
-If on entry to application you need to show a modal form, don't forget it needs a host (In top level). If you also set Desktop=.t. you can move these ShowWindow = 1 windows outside of their host window.
Hope these tips help. But again be warned it's harder than using with main window and some features are simply unavailable (ie:docked forms).
-Tip: Main VFP window could be there in fact but seem as if it wasn't (titlebar,controlbox etc removed and borders match with shown form).
Cetin