Allan,
Top-level forms can not be modal. When configured that way, VFP coerces the WindowType property to 0 (Non-modal) during form instantiation.
You can do what you by setting the Desktop property to .T. and moving _Screen visible and off the screen. Ex.
Form Init
With _Screen
.Top = 0 - (.Height + 10)
.Left = 0 - (.Width + 10)
.Visible = .T.
Endwith
Form Destroy
With _Screen
.Top = 0
.Left = 0
Endwith
Desktop forms can be modal so execution will stop. If you want the form's caption to show in the taskbar, you can set the caption property of _Screen to the same as your form's in the Init. That way, it will look exactly like a top-level form.
HTH.
>Hi,
>
>Im the apps that I've built so far, I have the standard things happening - i.e. run a splashscreen, set-up the environment in my start-up program, then run the login form.
>
>The login form WindowState is 0 (i.e. it appears within the main window).
>
>The code to run the login form is as follows:
>
>*
>Do Form frmLogin To llOKtoContinue
>
>*
>If the return value is .T., then the app is launched by activating the appropriate menu and doing a READ EVENTS.
>
>What I'd like to do is have the login form as a top-level form but no matter what I have tried so far, it isn't working properly. I've monkeyed around with the WindowState, ShowWindow, WindowType, and AlwaysOnTop properties to no avail.
>
>Can anyone point me in the right direction here - i.e. I'd like the login form to be a top-level form, and once the login is successful, them make the application visible.
>
>TIA, Al
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao