Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Initial Form Starts Behind Other Open Apps
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01356151
Message ID:
01357206
Views:
23
>I have an application that starts up behind all other open application windows. I'm sure that there is a logical explanation as to why it does it, but I can't figure it out. All my other apps start out on top as they should. The app that I'm having trouble with, has the "main" form as the top level form and it is set to FALSE for "Always on Top" and "Always on Bottom". Window State is Normal, and it is a MODAL form.
>
>Can someone point me in the right direction?
>

Hi,

An as-top-level form cannot be modal, i.e. if form.ShowWindow=2, then the .WindowType property is 0 at runtime, even when you set it to 1 in the IDE.
However, as a workaround for the misbehaving startup, you can toggle form.AlwaysOnTop, e.g. in form.Activate()
WITH Thisform as Form
	.AlwaysOnTop = !.AlwaysOnTop
	.AlwaysOnTop = !.AlwaysOnTop
ENDWITH
hth
-Stefan
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform