Autor Beitrag
Thunder
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 145

WinXP
D6 Pers
BeitragVerfasst: Sa 29.11.03 20:13 
Moin,

ausblenden Quelltext
1:
2:
SystemParametersInfo(Spi_SetFontSmoothing, Cardinal(True), Nil, 0);
  repaint;


funzt net!!!

ob bei FormCreate ober ButtonClick. Funzt einfach net in meinem Proggi.

Hab da noch n paar andre Sachen drin...TrayIcon, Schutz vor Mehrfachstart, Fensterschatten

woran liegts?? Hab WinXP und bei einme Beispielprogramm vom PC-Magazin funzt es...
Andreas Pfau
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 997



BeitragVerfasst: Mo 01.12.03 20:14 
Hallo,

zeig doch mal den Code der funzt! also nur die Funktion, innerhalb der SystemParametersInfo() aufgerufen wird.

_________________
Life is a bad adventure, but the graphic is really good!
Thunder Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 145

WinXP
D6 Pers
BeitragVerfasst: Mo 01.12.03 21:21 
ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
unit Unit1;

interface

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

type
  TForm1 = class(TForm)
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    CheckBox1: TCheckBox;
    procedure FormCreate(Sender: TObject);
    procedure FormDestroy(Sender: TObject);
    procedure CheckBox1Click(Sender: TObject);
  private
    { Private-Deklarationen }
    smooth_active: boolean;
  public
    { Public-Deklarationen }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);
begin
  SystemParametersInfo(SPI_GETFONTSMOOTHING, 1, @smooth_active, 0);
  checkbox1.Checked := smooth_active;
end;

procedure TForm1.FormDestroy(Sender: TObject);
begin
  SystemParametersInfo(SPI_SETFONTSMOOTHING, cardinal(smooth_active), nil0);
end;

procedure TForm1.CheckBox1Click(Sender: TObject);
var
  b : boolean;
begin
  b :=checkbox1.checked;
  SystemParametersInfo(SPI_SETFONTSMOOTHING, cardinal(b), 00);
  repaint;
end;

end.


PC-Magazin 11/2001

Moderiert von user profile iconTino: Code- durch Delphi-Tags ersetzt.
Andreas Pfau
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 997



BeitragVerfasst: Di 02.12.03 17:05 
Hallo,

keine Ahnung, ist im Prinzip identisch. Mir fällt nur noch eins ein: zuvor mal das ganze mit spi_GETfontsmoothing aufrufen - villeicht nutzt Windows das ja als so 'ne Art Initialisierungsroutine...

Oder eine 2. Variante: GENAU so aufrufen, also nicht mir Cardinal(True), sondern mit einer BOOLEAN-Variablen. Villeicht interpretiert der Compiler das minimal anders.

_________________
Life is a bad adventure, but the graphic is really good!
Thunder Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 145

WinXP
D6 Pers
BeitragVerfasst: Di 02.12.03 17:56 
sowas habe ich schon alles probiert...ich probiere weiter