Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ShowWindow Property in Windows 7 Professional

Status
Not open for further replies.

SitesMasstec

Programmer
Sep 26, 2010
526
Brasil
Hi colleagues!

When executing a form with some buttons in Windows 7 Professional all the buttons inside the form are invisible, except if the user pass the mouse pointer on them (invisible area used by the button). Each button appears when the mouse pointer is over it, and when the mouse is out, the button desappears again.

This do not happen in Windows 7 Home/Premium, Windows 8, Windows 10, as I have tested.
In the Form, the ShowWindow Property is set to 0 - In Screen (Default).

I have used this property for years, without any problem with buttons in forms. The problem appears on Windows 7 Professional.

To solve this I changed (by chance) the form ShowWindow Property to 1-In Top-Level Form, and the problem was solved!

Why this happens? (I searched in many of my VFP books, but haven't found an answer).

Thank you,





Thank you,
SitesMasstec
 
The visibility behaviour you describe is well known for legacy code @SAY @GET having problems with Themes and with Winforms overall. It should not happen with normal VFP forms with normal controls. It does then not happen, if you turn themes off (see _screen.themes and SYS(2700).

Are you perhaps having converted legacy screens to forms somewhere on the way to where you are now?

Bye, Olaf.
 
Hi Olaf!

No, I have not converted legacy screens to forms. I have created all my forms in VFP9.

But Themes property is set to 'True (default)'


Thank you,
SitesMasstec
 
But Themes property is set to 'True (default)'

That almost certainly explains the behaviour you are seeing.

I always include the following line near the start of my main program:

[tt]_screen.Themes = .F.[/tt]

It avoids various cosmetic problems, including the one you are seeing.

Mike







__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Hi Mike!

Well, if I put _screen.Themes = .F. in the main program, and then, the main program calls a form, and in the form property Themes is set to 'True (default)', the form will consider this last property (Themes: 'True (default)', won't it?

Won't it overide the _screen.Themes = .F. in the main program?



Thank you,
SitesMasstec
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top