Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dimmed or faded forms in VFP?
Message
From
01/06/2004 21:05:05
 
 
To
01/06/2004 16:43:06
Mike Sue-Ping
Cambridge, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00909025
Message ID:
00909102
Views:
20
Hi, Mike.

>Thanks...I know about those samples. While transparent forms are cool, it just not the same as having it dimmed and still opaque. I don't want the main form (Form A) show the underlying desktop, application or whatever. I think that would be even more distracting than the initial situation.

I'm not sure if doing this would be a really good idea, as this is not standard behavior, but you can take a shot at that.

What you need is to change the non-active form's color (and all its controls to a darker color, and restore it when active.

Basically, in the Deactivate, you have to recurse trough the Controls collection, saving the current (original) control ForeColor and BackColor in a property array or collection, then parse the RGB values and decrease each one of them (say divide it by 2). Don't forget to do it with the form also.

In the Activate, you have to do the same, but restoring the original colors.

Don't worry about performance, it shouldn't have a huge impact in a regular CPU.

Hope this helps,
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform