var Form1 : TForm1; R,G,B : Byte; implementation {$R *.DFM} Procedure TForm1.Affiche_Couleur(R,G,B : Byte); begin Panel3.Color:=RGB(R, G ,B); Label2.Caption := Inttostr(R);//affichage de la valeur décimale Label4.Caption := Inttostr(G); Label6.Caption := Inttostr(B); Label13.Caption := '$'+IntToHex(ScrollBar1.position,4) +IntToHex(ScrollBar2.position,2) +IntToHex(ScrollBar3.position,2); end; procedure TForm1.FormCreate(Sender: TObject); begin R :=$00B0; G :=$C5; B :=$E0; Affiche_Couleur(R,G,B); end;
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionprocedure TForm1.SpeedButton1Click(Sender: TObject); begin Richedit1.SelectAll; if fsbold in Richedit1.SelAttributes.Style then begin Richedit1.SelAttributes.Style:=richedit1.SelAttributes.style-[fsbold]; Richedit1.SelAttributes.Color:=ClBlack; end else begin Richedit1.SelAttributes.Style:=richedit1.SelAttributes.style+[fsbold]; Richedit1.SelAttributes.Color:=ClRed; end; end;
Décrit les caractéristiques de formatage du texte sélectionné dans le contrôle éditeur de texte formaté..
Richedit1.SelAttributes.Brush.Color:=Clyellow;;
Richedit1.color := ClRed;
var H : HDC; begin H := Canvas.Handle; ... end;
H := Canvas.Handle; For x :=100 to 200 do for y := 50 to 400 do begin windows.SetPixel(H,x,y,clYellow); end;