Board index » delphi » Delphi 1.0 Brush Style Problems

Delphi 1.0 Brush Style Problems

I am developing a graphics application and have run into a snag.  I am
using Delphi 1.0 to develop this and of course make heavy use of the
Brush Style property for fill effects.  However when I try to run it
under Windows 95 the Brush Style will revert to bsSolid for any Brush
Color other than clBlack and clWhite.  The Delphi 1.0 sample graphics
program "GRAPHEX.DPR" seems to exhibit the same behavior.  The Delphi
2.0 example application of the same name works fine even though the
code "looks" identical.

Question: What can be done about this so that the 16 bit application
will run under Windows 95 -or- am I hosed and need to distribute a 16
and 32 bit version?

Regards,
Jay Foster
jayl...@mindspring.com

 

Re:Delphi 1.0 Brush Style Problems


Jay,
  I tried butting a button on a form and gave it's OnClick event the
following under D1 and W95:

procedure TForm1.Button1Click(Sender: TObject);
begin
  with Form1.Canvas do
  begin
    Brush.Style := bsDiagCross;
    Brush.Color := clBlue;
    Rectangle(12, 50, 100, 200);
  end;
end;

This worked fine with several different styles and colors.  Not much help
but points more towards a hardware/driver problem than D1.  Have you tried
running the compiled program on other machines to see if the problem
persists.  If not then you might want to go to your video card's internet
site and see if they have updated drivers (many do).  This has been the
source of stranger problems.

Hope this helps!
--
Rod Geraghty (:>)
GERA-Tech
Ottawa, Canada
gera...@ibm.net

Jay Foster <jayl...@mindspring.com> wrote in article
<333681e9.1137...@news.mindspring.com>...

Quote
> I am developing a graphics application and have run into a snag.  I am
> using Delphi 1.0 to develop this and of course make heavy use of the
> Brush Style property for fill effects.  However when I try to run it
> under Windows 95 the Brush Style will revert to bsSolid for any Brush
> Color other than clBlack and clWhite.  The Delphi 1.0 sample graphics
> program "GRAPHEX.DPR" seems to exhibit the same behavior.  The Delphi
> 2.0 example application of the same name works fine even though the
> code "looks" identical.

> Question: What can be done about this so that the 16 bit application
> will run under Windows 95 -or- am I hosed and need to distribute a 16
> and 32 bit version?

> Regards,
> Jay Foster
> jayl...@mindspring.com

Other Threads