怎样使 Panel 面板透明? 能看见 Panel 后面的控件,把Panel面板隐藏不就行了吗 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 用右键点Panel,在弹出菜单里面选“Control|Send to back” 是这样的,我的 Panel 上还放有可视控件,要让 Panel 透明,使其背后的图片能看得见。我是在 Toolbar 上用的 Panel 控件, 它不能把 Toolbar 的背景图片给遮住了。 //这里给你贴一段flatpanel的代码给你procedure TFlatPanel.Paint;var memoryBitmap: TBitmap; textBounds: TRect; Format: UINT;begin textBounds := ClientRect; Format := DT_SINGLELINE or DT_VCENTER; case Alignment of taLeftJustify: Format := Format or DT_LEFT; taCenter: Format := Format or DT_CENTER; taRightJustify: Format := Format or DT_RIGHT; end; memoryBitmap := TBitmap.Create; // create memory-bitmap to draw flicker-free try memoryBitmap.Height := ClientRect.Bottom; memoryBitmap.Width := ClientRect.Right; // Draw Background if FTransparent then DrawParentImage(Self, memoryBitmap.Canvas) else begin memoryBitmap.Canvas.Brush.Color := Self.Color; memoryBitmap.Canvas.FillRect(ClientRect); end; // Draw Border// Frame3DBorder(memoryBitmap.Canvas, ClientRect, FColorHighlight, FColorShadow, 1); // Draw Text memoryBitmap.Canvas.Font := Self.Font; memoryBitmap.Canvas.Brush.Style := bsClear; if not Enabled then begin OffsetRect(textBounds, 1, 1); memoryBitmap.Canvas.Font.Color := clBtnHighlight; DrawText(memoryBitmap.Canvas.Handle, PChar(Caption), Length(Caption), textBounds, Format); OffsetRect(textBounds, -1, -1); memoryBitmap.Canvas.Font.Color := clBtnShadow; DrawText(memoryBitmap.Canvas.Handle, PChar(Caption), Length(Caption), textBounds, Format); end else DrawText(memoryBitmap.Canvas.Handle, PChar(Caption), Length(Caption), textBounds, Format); // Copy memoryBitmap to screen canvas.CopyRect(ClientRect, memoryBitmap.canvas, ClientRect); finally memoryBitmap.free; // delete the bitmap end;end; 你装一个flatstyle控件,里面的panel是可以透明的 delphi PageControl的问题 delphi结构中位是怎么定义的? 怎么把DBGridEh列的配置保存到数据库中? SOS!我们需要一个邮件群发软件及相关邮件地址,我不熟大家能不指点一二先谢了 找不到所需的 .DLL 文件 - VCLADO50.BPL 请问高手,为什么我每次创建一个类,并释放后,delphi会提示没有初始化??? 谁有flatstyle控件for D6的?50分大放送! 如何对ClientDataSet中的数据进行按字段的排序,谢谢! 学习delphi 再求解Socket图片传送? 关闭指定的程序问题 怎么实现汉化软件?急,急急!!
var
memoryBitmap: TBitmap;
textBounds: TRect;
Format: UINT;
begin
textBounds := ClientRect;
Format := DT_SINGLELINE or DT_VCENTER;
case Alignment of
taLeftJustify:
Format := Format or DT_LEFT;
taCenter:
Format := Format or DT_CENTER;
taRightJustify:
Format := Format or DT_RIGHT;
end; memoryBitmap := TBitmap.Create; // create memory-bitmap to draw flicker-free
try
memoryBitmap.Height := ClientRect.Bottom;
memoryBitmap.Width := ClientRect.Right; // Draw Background
if FTransparent then
DrawParentImage(Self, memoryBitmap.Canvas)
else
begin
memoryBitmap.Canvas.Brush.Color := Self.Color;
memoryBitmap.Canvas.FillRect(ClientRect);
end; // Draw Border
// Frame3DBorder(memoryBitmap.Canvas, ClientRect, FColorHighlight, FColorShadow, 1); // Draw Text
memoryBitmap.Canvas.Font := Self.Font;
memoryBitmap.Canvas.Brush.Style := bsClear;
if not Enabled then
begin
OffsetRect(textBounds, 1, 1);
memoryBitmap.Canvas.Font.Color := clBtnHighlight;
DrawText(memoryBitmap.Canvas.Handle, PChar(Caption), Length(Caption), textBounds, Format);
OffsetRect(textBounds, -1, -1);
memoryBitmap.Canvas.Font.Color := clBtnShadow;
DrawText(memoryBitmap.Canvas.Handle, PChar(Caption), Length(Caption), textBounds, Format);
end
else
DrawText(memoryBitmap.Canvas.Handle, PChar(Caption), Length(Caption), textBounds, Format); // Copy memoryBitmap to screen
canvas.CopyRect(ClientRect, memoryBitmap.canvas, ClientRect);
finally
memoryBitmap.free; // delete the bitmap
end;
end;