procedure TForm1.SpeedButton1MouseDown(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
var
Bmp:TBitmap;
begin
Bmp:=TBitmap.Create;
try
//用鼠标左键和右键分别点击
if Button=mbLeft then
ImageList1.GetBitmap(0,Bmp)
else
ImageList1.GetBitmap(1,Bmp);
SpeedButton1.Glyph:=Bmp;
finally
Bmp.Free;
end;
end;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
var
Bmp:TBitmap;
begin
Bmp:=TBitmap.Create;
try
//用鼠标左键和右键分别点击
if Button=mbLeft then
ImageList1.GetBitmap(0,Bmp)
else
ImageList1.GetBitmap(1,Bmp);
SpeedButton1.Glyph:=Bmp;
finally
Bmp.Free;
end;
end;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货