Einzelnen Beitrag anzeigen

Benutzerbild von delphi_user14
delphi_user14

Registriert seit: 10. Jun 2008
Ort: Au am Leithagebirge (Österreich)
105 Beiträge
 
Delphi 2007 Enterprise
 
#10

Re: Progressbar flackert unter Vista

  Alt 17. Jun 2008, 20:04
Nein

Delphi-Quellcode:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ComCtrls;

type
  TForm1 = class(TForm)
    ProgressBar1: TProgressBar;
    Button1: TButton;
    Button2: TButton;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

const
  PBS_MARQUEE = $08;
  PBM_SETMARQUEE = wm_user +10;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var
cs: longint;
begin
 cs := getwindowlong(progressbar1.Handle, gwl_style);
 setwindowlong(progressbar1.Handle, gwl_style, cs or PBS_MARQUEE);
 sendmessage(progressbar1.Handle, PBM_SETMARQUEE, 1, 40);
 form1.DoubleBuffered := true;
end;
Patrick K.
  Mit Zitat antworten Zitat