procedure SetButtonStyle(Button : TButton); const BS_MASK = $000F; var Style: Word; I : Integer; begin Style := BS_PUSHBUTTON;
for i:= 0 to Form1.ComponentCount-1 do begin if Form1.Components[i] is TButton then if GetWindowLong(TButton(Form1.Components[i]).Handle, GWL_STYLE) and BS_MASK <> Style then SendMessage(TButton(Form1.Components[i]).Handle, BM_SETSTYLE, Style, 1); end;
If Button = nil then exit;
if Button.HandleAllocated then begin Style := BS_DEFPUSHBUTTON; if GetWindowLong(Button.Handle, GWL_STYLE) and BS_MASK <> Style then SendMessage(Button.Handle, BM_SETSTYLE, Style, 1); end; end;
Den er sin egen resiprokke ... Så den stoppe du bare en knap ind i ...
pellelil >> sikkert rigtigt, men det hjalp ikke :))
Synes godt om
Ny brugerNybegynder
Din løsning...
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.