Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Login form as top level?
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00565264
Message ID:
00565431
Views:
28
Thanks Larry,

I got the thing working like I want it to by doing this in the start-up prg.:

1. In config.fpw ---> screen = off
2. First line of code in statup program (_screen.visible= .F.)
3. Run the splash form
4. Set-up enviromnent
5. Run the login form (top-level, non-modal)
6. Issue a Read Events
7. Upon successful login, release the login form and issue Clear Events in destroy method
8. _Screen.visible = .T. and _SCREEN.WINDOWSTATE = 2
9. Depending on the access level, run the appropriate menu.
10. Issue a Read Events for a second time

This seems to work just fine to give me my top-level login form.

>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
Al Williams

Anola MB, CANADA
Previous
Reply
Map
View

Click here to load this message in the networking platform