Subject Re: Turn Off Windows Theme
From Mervyn Bick <invalid@invalid.invalid>
Date Sun, 15 Jul 2018 12:51:07 +0200
Newsgroups dbase.getting-started

On 2018-07-15 10:58 AM, Michael wrote:
> Thanks Guys,
>
> Mervyn your script works a treat, thank you but I havent mastered creating a custom form.
>
> I will work it out, if i still have issues, i will ask.
>

Creating a custom form is the same as creating a form. :-)  Use the 'New
Custom Form' icon (the yellow one) in the Navigator instead of the 'New
Form' icon.  Simply change the systemtheme property to false and save
the form.

Forms based on a custom form will contain everything in the custom form
plus whatever is added to the form itself.

Using the custom form designer will stream out coordinates for the form.
  These are used when the custom form is set in the form designer but
they are meaningless for what you need here so that can be left out.
(Each form already has it's own coordinates which will overwrite any
values in the custom form anyway.)  Simply copy and paste the code from
my earlier message into a new program file and save it as
systemtheme_false.cfm

The same thing applies to creating custom controls for the form.  It can
be done using the form designer although it is a bit more complicated
than creating a custom form.  As you only need the systemtheme property
in your custom controls the code for custom controls is literally
skeletal. :-) Simply copy and paste the code from my earlier message
into a new program file and save it as mypb.cc

I called the .cc file mypb.cc.  If you want to use something more
descriptive you will need to change the line in the program that adds
'set procedure to mypb.cc' to each form.

I also opted to call the custom controls mypb and mygrid.  Feel free to
use any names you like.  No change is required in the program to deal
with custom control names that differ from the ones I have used..

The code I posted only deals with pushbuttons and grids.  You will need
to include custom controls for all visual objects you have used in your
forms such as labels, textlabels, entryfields and so on.  The only thing
that changes for each object is the classname of the control and the
name of the custom control so this is basically a copy and paste
exercise with a minimum of editing.

For each object you add to the .cc file you will need to add the elesif
block in the program.  Agin, basically a copy and paste operation but
make sure you change the number of characters that are overwritten to
suit each control.

If, at the end of all this, you find that you missed a control used on
one of your forms simply add the custom control to the .cc file, add the
elseif block to the program and run it again.  As all the other base
controls have been replaced only the new custom control will be inserted.

As with anything that makes changes to code or tables, make sure you
have a full up-to-date backup safely tucked away. :-)

Mervyn.