Changeset 16 for trunk/Forms


Ignore:
Timestamp:
Sep 29, 2014, 4:12:21 PM (10 years ago)
Author:
chronos
Message:
  • Modified: Do not clear entire form background. Do not clear paintbox background by control itself. This should speed drawing slightly.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMain.pas

    r13 r16  
    77uses
    88  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, Menus,
    9   ExtCtrls, ComCtrls, types;
     9  ExtCtrls, ComCtrls, types, LCLType;
    1010
    1111type
     
    6464    MousePos: TPoint;
    6565    Activated: Boolean;
     66    procedure EraseBackground(DC: HDC); override;
    6667  public
    6768    procedure UpdateStatusBar;
     
    9192  PaintBox1.Repaint;
    9293  UpdateStatusBar;
     94end;
     95
     96procedure TFormMain.EraseBackground(DC: HDC);
     97begin
     98  // Do nothing, completely covered by paintbox
    9399end;
    94100
     
    128134begin
    129135  TempBitmap := TBitmap.Create;
     136  ControlStyle := ControlStyle + [csOpaque];
     137  PaintBox1.ControlStyle := PaintBox1.ControlStyle + [csOpaque];
    130138end;
    131139
Note: See TracChangeset for help on using the changeset viewer.