Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
_SCREEN shows XP style in exe
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows 10
Network:
Windows Server 2012 R2
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01667192
Message ID:
01667820
Views:
86
>>>>>I wonder if there is a way to change this behavior:
>>>>>
>>>>>When working in the VFP IDE, the _SCREEN shows the Windows 10 style caption (light coloured title bar, minimize,maximize and close buttons transparent).
>>>>>
>>>>>But when compiling the executable and running the application from the exe, the title bar shows the Windows 7 or XP style: blue background etc.
>>>>>
>>>>>Perhaps I am missing a property?
>>>>
>>>>Do you get the same behavior with a "bare-bones" program (e.g. a simple modal dialog box on FoxPro main window) to see if you get the same effect?
>>>>
>>>>Are you using an application framework? This may have an effect on appearance and behavior.
>>>>
>>>>Make sure that the EXE isn't named such that Windows may mistake it for an installation program (e.g. avoid filenames like install.exe or setup.exe).
>>>
>>>That was a great idea. Indeed with this approach (same config.fpw, but then only _SCREEN.Visible = .T. and messagebox) it shows the correct _SCREEN layout.
>>>
>>>So now I need to figure out where the difference is in settings or something else. But now I can go step by step adding the settings that lead to the change.
>>
>>Christian,
>>
>>I have the same behavior in my application. After experimenting, I've determined for me the cause of the problem was a settings in the CONFIG.FPW I had the command "screen=off". The this command allows a splash screen to appear with the user's desktop as a background instead of a form at program launch .
>>
>>When this is command is removed, or the file removed entirely from the program's folder, the Windows 10 desktop appears as desired.
>>
>>Not sure how to have both -- i.e. a splash screen that appears as desired and the standard Win 10 look. If someone knows, please chime in.
>>
>>Dave
>
>In the end I found the culprit. I also use SCREEN=off in config.fwp, because the application shows with a single splash screen and then login form without the backscreen. But after trying back and forward, it was the hint of Jörg Schneider, to change the order of setting the screen visible before changing the window state:
>
> _SCREEN.VISIBLE = .T.
> _SCREEN.WindowState = 2
>
>Usually I set WindowState =2 before setting the screen visible, because intuitively it appears that you want to have the screen maximized before making it visible, to avoid that quick more from restore position to maximized. But since doing this change it appears correct now. So I could let the screen=off in config.fwp.

Yes, that was exactly the issue for me -- the WindowState command needed to follow the Visible command. I made this change and launch and main window appearance worked as desired. And I agree with you that this is counter intuitive. But whatever works...
Dave
Previous
Reply
Map
View

Click here to load this message in the networking platform