Subject Re: Turn Off Windows Theme
From <rich@autotraker.com> <<rich@autotraker.com>>
Date Mon, 9 Jul 2018 11:55:33 -0400
Newsgroups dbase.getting-started

There is no easy way. You could write a program that will open each code
file, recuse though it and modify them.
This is a good example of why you should never use a stock control.
So while you have to modify all your code, you might as well convert to
using all custom controls.
I have one large CC which contains a subclassed version of every stock
control. I only use that CC along with every contained control in all my
projects.
That way if I am forced to make a global change I can do it right there is a
single CC and the change will cascade to every form.
it might actually be easier to write a program and change each stock control
to a custom control than to insert a new parameter.
For example if I create a CC for my pushbutton, and name it TIPUSHBUTTON
CLASS TIPushbutton(FormObj) OF Pushbutton(FormObj) custom
    with (this)
        systemTheme = false
    endwith
endclass

Then in each form I just have to search for "new PUSHBUTTON(this)"
this.EXPORT = new PUSHBUTTON(this)
and replace it with "new TIPUSHBUTTON(this)"
this.EXPORT = new TIPUSHBUTTON(this)

Then add the set proc to my CC to the constrictor of each form.
Your CC or custom control file could actually contain numerous classes, each
one for different controls.
I believe the dUFLP contains example of a CC with multiple controls and even
has a global replace routines.
Might take you a while to get done but certainly not a year and you'll be
setup to make global changes in the future.
Hope this helps,
Rich...







"Michael"  wrote in message news:qvk36q4FUHA.1352@ip-AC1E04A7...

I wam upgrading all my legacy Visual Dbase 7.5 to Dbase 11 and maybe even
Windows 12. The biggest issue I have is that the default setting for all
controls is the Windows Theme is set to TRUE and all my buttons are greyed
out.

This may not sound like much but I have over 400,000 lines of code with
hundreds of forms and buttons and will take me a year to convert them all to
FALSE so my software can retail the custom colours and Labels set throughout
the software.

How can I turn windows theme off or set DBASE controls to have Windows Theme
turns off?

Anyone?

Regards,

Michael.