That's new info, what's your forms desktop and showwindow?
Experimenting a bit I see that happen if desktop=.T., not if desktop=.F. at the same time having ShowWindow=2.
The help on the Desktop property remarks you shouldn't mix these two things. So this unwanted behaviour might be related. If you have set ShowWindow=2, which you should, if you want it to become display size, then it's not confined in the _screen and will display on the desktop and not be clipped by _screen, that's enough.
Finally, I can reproduce this with this class:
Code:
o = CREATEOBJECT("myform")
o.show
DEFINE CLASS myform as Form
Desktop = .T.
Showwindow = 2
WindowState = 2
TitleBar=0
ENDDEFINE
If you test this, no worries to not get back to your desktop, you have Windows+M and Windows key alone will bring up the taskbar (that's not said to solve the problem, but to guide others testing this to get back into the VFP IDE and let that become activated).
Setting TitleBar=1 (default) or Desktop = .F. (default) stops this behavior. And I think it's even more about the title bar removal, because with Desktop = .F. the titlebar appears, too. I think this is related to a top-level form. Top-level forms also can't be modal, even when you set them modal. They also seem not be able to be without titlebar, unless Desktop=.T. puts the form into kiosk mode. It's a wild guess on that, but I think you can't get all you want if you want a borderless form without titlebar to appear maximised without hiding the taskbar, too. In the end no titlebar and no border and maximised top-level form all together with Desktop=.T. rather make your form look like a desktop itself, not just
in the desktop.
Bye, Olaf.
PS: Notice, I didn't care for the BorderStyle, as maximised forms get borderless anyway, even if the form in a normal state still has borders.