ListView 百分比进度条(delphi版)

在看代码之前先给大家附上效果图:

废话不多说了,直接给大家贴代码了。

unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ComCtrls, ImgList;
type
TForm1 = class(TForm)
btn1: TButton;
lv1: TListView;
trckbr1: TTrackBar;
il1: TImageList;
procedure lv1CustomDraw(Sender: TCustomListView; const ARect: TRect; var DefaultDraw: Boolean);
procedure lv1CustomDrawItem(Sender: TCustomListView; Item: TListItem; State: TCustomDrawState; var DefaultDraw: Boolean);
procedure btn1Click(Sender: TObject);
procedure trckbr1Change(Sender: TObject);
private
function ReDrawItem(HwndLV: HWND; ItemIndex: integer): boolean;
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
uses
CommCtrl;
{$R *.dfm}
//画状态条
procedure DrawSubItem(LV: TListView; Item: TListItem; SubItem: Integer; Prosition: Single; Max, Style: Integer; IsShowProgress: Boolean; DrawColor: TColor = $00005B00; FrameColor: TColor = $00002F00);
//获取SubItem的区域
function GetItemRect(hWndLV: HWnd; iItem, iSubItem: Integer): TRect;
var
Rect: TRect;
begin
ListView_GetSubItemRect(hWndLV, iItem, iSubItem, iSubItem, @Rect);
Result := Rect;
end;
var
PaintRect, R: TRect;
i, iWidth, x, y: Integer;
S: string;
begin
with lv do
begin
PaintRect := GetItemRect(lv.Handle, Item.Index, SubItem);
R := PaintRect;
if Prosition >= Max then
Prosition := 100
else
begin
if Prosition <= 0 then
Prosition := 0
else
Prosition := Round((Prosition / MAX) * 100);
end;
if (Prosition = 0) and (not IsShowProgress) then
Canvas.FillRect(r) //如果是0 ,直接显示空白
else
begin
//先填充背景
Canvas.FillRect(r);
Canvas.Brush.Color := Color;
//画一个外框
InflateRect(R, -2, -2);
Canvas.Brush.Color := FrameColor;
Canvas.FrameRect(R);
Canvas.Brush.Color := Color;
InflateRect(R, -1, -1);
//InflateRect(R,-1,-1);
//根据百分比计算出要花的进度条内容概述
iWidth := R.Right - Round((R.Right - R.Left) * ((100 - Prosition) / 100));
case Style of
0: //实心
begin
Canvas.Brush.Color := DrawColor;
R.Right := iWidth;
Canvas.FillRect(R);
end;
1: //竖线填充
begin
i := r.Left;
while i < iWidth do
begin
Canvas.Pen.Color := Color;
Canvas.MoveTo(i, R.Top);
Canvas.Pen.Color := DrawColor;
Canvas.LineTo(i, R.Bottom);
Inc(i, 3);
end;
end;
end; //case end
//画好进度条后,现在要做的就是显示进度数字了
Canvas.Brush.Style := bsClear;
if Prosition = Round(Prosition) then
S := Format('%d%%', [Round(Prosition)])
else
S := FormatFloat('#0.0', Prosition);
with PaintRect do
begin
x := Left + (Right - Left + 1 - Canvas.TextWidth(S)) div 2;
y := Top + (Bottom - Top + 1 - Canvas.TextHeight(S)) div 2;
end;
SetBkMode(Canvas.Handle, TRANSPARENT);
Canvas.TextRect(PaintRect, x, y, S);
end;
//画完恢复
Canvas.Brush.Color := Color;
end;
end;
procedure TForm1.lv1CustomDraw(Sender: TCustomListView; const ARect: TRect; var DefaultDraw: Boolean);
begin
end;
//上面是画进度条的,现在要给TlistView处理Item重绘的消息,事件是OnCustomDrawItem,需要说明的是,如果想要随心所欲的自画Item,那么就要全部自己来完成,不再需要系统来处理:
procedure TForm1.lv1CustomDrawItem(Sender: TCustomListView; Item: TListItem; State: TCustomDrawState; var DefaultDraw: Boolean);
var
BoundRect, Rect: TRect;
i: integer;
TextFormat: Word;
LV: TListView;
//这个子过程是用来画CheckBox和ImageList的
procedure Draw_CheckBox_ImageList(r: TRect; aCanvas: TCanvas; Checked: Boolean);
var
R1: TRect;
i: Integer;
begin
if Sender.Checkboxes then
begin
aCanvas.Pen.Color := clBlack;
aCanvas.Pen.Width := 2;
//画CheckBox外框
aCanvas.Rectangle(R.Left + 2, R.Top + 2, R.Left + 14, R.Bottom - 2);
if Checked then //画CheckBox的钩
begin
aCanvas.MoveTo(R.Left + 4, R.Top + 6);
aCanvas.LineTo(R.Left + 6, R.Top + 11);
aCanvas.LineTo(R.Left + 11, R.Top + 5);
end;
aCanvas.Pen.Width := 1;
end;
//开始画图标
i := 2; //ImageIndex的值,可以任意
if i > -1 then
begin
//获取图标的RECT
if Boolean(ListView_GetSubItemRect(sender.Handle, item.Index, 0, LVIR_ICON, @R1)) then
begin
//ImageList_Stats.Draw(LV.Canvas, R1.Left, R1.Top, i);
if item.ImageIndex > -1 then
LV.SmallImages.Draw(LV.Canvas, R1.Right + 2, R1.Top, item.ImageIndex);
end;
end;
end;
begin
LV := TListView(Sender);
BoundRect := Item.DisplayRect(drBounds);
InflateRect(BoundRect, -1, 0);
//这个地方你可以根据自己的要求设置成想要的颜色,实现突出显示
LV.Canvas.Font.Color := clBtnText;
//查看是否被选中
if Item.Selected then
begin
if cdsFocused in State then
begin
LV.Canvas.Brush.Color := $00ECCCB9; // //clHighlight;
end
else
begin
LV.Canvas.Brush.Color := $00F8ECE5; //clSilver;
end;
end
else
begin
if (Item.Index mod 2) = 0 then
LV.Canvas.Brush.Color := clWhite
else
LV.Canvas.Brush.Color := $00F2F2F2;
end;
LV.Canvas.FillRect(BoundRect); // 初始化背景
for i := 0 to LV.Columns.Count - 1 do
begin
//获取SubItem的Rect
ListView_GetSubItemRect(LV.Handle, Item.Index, i, LVIR_LABEL, @Rect);
case LV.Columns[i].Alignment of
taLeftJustify:
TextFormat := DT_LEFT;
taRightJustify:
TextFormat := DT_RIGHT;
taCenter:
TextFormat := DT_CENTER;
else
TextFormat := DT_CENTER;
end;
case i of
0: //画Caption,0表示Caption,不是Subitem
begin
//先画选择框和图标
Draw_CheckBox_ImageList(BoundRect, LV.Canvas, Item.Checked);
//再画Caption的文字
InflateRect(Rect, -(5 + il1.Width), 0); //向后移3个像素,避免被后面画线框时覆盖
//InflateRect(Rect, -(5), 0); //向后移3个像素,避免被后面画线框时覆盖
DrawText(LV.Canvas.Handle, PAnsiChar(Item.Caption), Length(Item.Caption), Rect, DT_VCENTER or DT_SINGLELINE or DT_END_ELLIPSIS or TextFormat);
end;
1..MaxInt: //画SubItem[i]
begin
if (i - 1) = 1 then //显示状态条,本示例是第三栏显示,可以随便定
begin
DrawSubItem(LV, Item, i, StrToFloatDef(Item.SubItems[i - 1], 0), 100, 0, True);
end
else
begin
//画SubItem的文字
InflateRect(Rect, -2, -2);
if i - 1 <= Item.SubItems.Count - 1 then
DrawText(LV.Canvas.Handle, PCHAR(Item.SubItems[i - 1]), Length(Item.SubItems[i - 1]), Rect, DT_VCENTER or DT_SINGLELINE or DT_END_ELLIPSIS or TextFormat);
end;
end;
end; //end case
end; //end for
LV.Canvas.Brush.Color := clWhite;
if Item.Selected then //画选中条外框
begin
if cdsFocused in State then//控件是否处于激活状态
LV.Canvas.Brush.Color := $00DAA07A // $00E2B598; //clHighlight;
else
LV.Canvas.Brush.Color := $00E2B598; //$00DAA07A // clHighlight;
LV.Canvas.FrameRect(BoundRect); //
end;
DefaultDraw := False; //不让系统画了
with Sender.Canvas do
if Assigned(Font.OnChange) then
Font.OnChange(Font);
end;
function TForm1.ReDrawItem(HwndLV: HWND; ItemIndex: integer): boolean;
begin
Result := ListView_RedrawItems(HwndLV, ItemIndex, ItemIndex);
end;
procedure TForm1.btn1Click(Sender: TObject);
var
Item: TListItem;
begin
//使用:
item := LV1.Items[1];
if Item = nil then
Exit;
item.subitems[1] := '30'; //设置为30%
//然后刷新这个item
ReDrawItem(LV1.handle, Item.Index);
end;
procedure TForm1.trckbr1Change(Sender: TObject);
var
Item: TListItem;
begin
//使用:
item := LV1.Items[0];
item.subitems[1] := IntToStr(trckbr1.Position);
//然后刷新这个item
ReDrawItem(LV1.handle, Item.Index);
end;
end. 

object Form1: TForm1
Left = 416
Top = 301
Width = 494
Height = 170
Caption = 'Form1'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
PixelsPerInch = 96
TextHeight = 13
object btn1: TButton
Left = 272
Top = 96
Width = 75
Height = 25
Caption = 'btn1'
TabOrder = 0
OnClick = btn1Click
end
object lv1: TListView
Left = 16
Top = 8
Width = 457
Height = 81
Columns = <
item
Caption = '名称'
Width = 100
end
item
Caption = '分类'
Width = 100
end
item
Caption = '进度'
Width = 100
end
item
Caption = '资源'
Width = 100
end>
GridLines = True
Items.Data = {
5B000000020000000200000000000000FFFFFFFF020000000000000006B4F3B8
BBCECC04D3CECFB70333354D01000000FFFFFFFFFFFFFFFF0200000000000000
08446F7461B4ABC6E604D3CECFB7043130304DFFFFFFFFFFFFFFFF}
ShowWorkAreas = True
SmallImages = il1
TabOrder = 1
ViewStyle = vsReport
OnCustomDrawItem = lv1CustomDrawItem
end
object trckbr1: TTrackBar
Left = 16
Top = 96
Width = 233
Height = 33
Max = 100
TabOrder = 2
OnChange = trckbr1Change
end
object il1: TImageList
Left = 384
Top = 96
Bitmap = {
494C010103000F00040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
0000000000003600000028000000400000004000000001002000000000000040
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000006600004D4D
4D00000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000006600004D4D
4D00000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000006600004D4D
4D00000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000006600004D4D
4D00000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000006600000066
00004D4D4D004D4D4D0000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000006600000066
00004D4D4D004D4D4D0000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000006600000066
00004D4D4D004D4D4D0000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000006600000066
00004D4D4D004D4D4D0000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000006600000D90
1A00026F0400165D0E004D4D4D00000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000006600000D90
1A00026F0400165D0E004D4D4D00000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000006600000D90
1A00026F0400165D0E004D4D4D00000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000006600000D90
1A00026F0400165D0E004D4D4D00000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000066000014A0
270016AB2B0007840F00056303004D4D4D004D4D4D0000000000000000000000
00000000000000000000000000000000000000000000000000000066000014A0
270016AB2B0007840F00056303004D4D4D004D4D4D0000000000000000000000
00000000000000000000000000000000000000000000000000000066000014A0
270016AB2B0007840F00056303004D4D4D004D4D4D0000000000000000000000
00000000000000000000000000000000000000000000000000000066000014A0
270016AB2B0007840F00056303004D4D4D004D4D4D0000000000000000000000
00000000000000000000000000000000000000000000000000000066000019A5
32001CB5360017B02D000C951700016A02001A5C11004D4D4D00000000000000
00000000000000000000000000000000000000000000000000000066000019A5
32001CB5360017B02D000C951700016A02001A5C11004D4D4D00000000000000
00000000000000000000000000000000000000000000000000000066000019A5
32001CB5360017B02D000C951700016A02001A5C11004D4D4D00000000000000
00000000000000000000000000000000000000000000000000000066000019A5
32001CB5360017B02D000C951700016A02001A5C11004D4D4D00000000000000
0000000000000000000000000000000000000000000000000000006600001FAB
3D0022BB44001CB5360017B02D000FA51E0003790600096105004D4D4D000000
0000000000000000000000000000000000000000000000000000006600001FAB
3D0022BB44001CB5360017B02D000FA51E0003790600096105004D4D4D000000
0000000000000000000000000000000000000000000000000000006600001FAB
3D0022BB44001CB5360017B02D000FA51E0003790600096105004D4D4D000000
0000000000000000000000000000000000000000000000000000006600001FAB
3D0022BB44001CB5360017B02D000FA51E0003790600096105004D4D4D000000
00000000000000000000000000000000000000000000000000000066000023B0
460029C2520022BB44001CB5360017B02D000FA91F0005880B00016A01004D4D
4D004D4D4D0000000000000000000000000000000000000000000066000023B0
460029C2520022BB44001CB5360017B02D000FA91F0005880B00016A01004D4D
4D004D4D4D0000000000000000000000000000000000000000000066000023B0
460029C2520022BB44001CB5360017B02D000FA91F0005880B00016A01004D4D
4D004D4D4D0000000000000000000000000000000000000000000066000023B0
460029C2520022BB44001CB5360017B02D000FA91F0005880B00016A01004D4D
4D004D4D4D0000000000000000000000000000000000000000000066000026B3
4D0030C9600029C2520022BB44001CB5360017B02D000FA91F00089B10000271
030011610B004D4D4D00000000000000000000000000000000000066000026B3
4D0030C9600029C2520022BB44001CB5360017B02D000FA91F00089B10000271
030011610B004D4D4D00000000000000000000000000000000000066000026B3
4D0030C9600029C2520022BB44001CB5360017B02D000FA91F00089B10000271
030011610B004D4D4D00000000000000000000000000000000000066000026B3
4D0030C9600029C2520022BB44001CB5360017B02D000FA91F00089B10000271
030011610B004D4D4D00000000000000000000000000000000000066000027B3
4D0033CC660030C9600029C2520022BB44001CB5360017B02D000EA41D00037D
0600066404004D4D4D00000000000000000000000000000000000066000027B3
4D0033CC660030C9600029C2520022BB44001CB5360017B02D000EA41D00037D
0600066404004D4D4D00000000000000000000000000000000000066000027B3
4D0033CC660030C9600029C2520022BB44001CB5360017B02D000EA41D00037D
0600066404004D4D4D00000000000000000000000000000000000066000027B3
4D0033CC660030C9600029C2520022BB44001CB5360017B02D000EA41D00037D
0600066404004D4D4D0000000000000000000000000000000000006600002DB9
530035CE680033CC660030C9600029C2520022BB440015A12800036F0500165D
0E00000000000000000000000000000000000000000000000000006600002DB9
530035CE680033CC660030C9600029C2520022BB440015A12800036F0500165D
0E00000000000000000000000000000000000000000000000000006600002DB9
530035CE680033CC660030C9600029C2520022BB440015A12800036F0500165D
0E00000000000000000000000000000000000000000000000000006600002DB9
530035CE680033CC660030C9600029C2520022BB440015A12800036F0500165D
0E000000000000000000000000000000000000000000000000000066000032BE
58003CD56F0035CE680033CC660030C960001494280005630300000000000000
00000000000000000000000000000000000000000000000000000066000032BE
58003CD56F0035CE680033CC660030C960001494280005630300000000000000
00000000000000000000000000000000000000000000000000000066000032BE
58003CD56F0035CE680033CC660030C960001494280005630300000000000000
00000000000000000000000000000000000000000000000000000066000032BE
58003CD56F0035CE680033CC660030C960001494280005630300000000000000
00000000000000000000000000000000000000000000000000000066000036C2
5C0043DC76003CD56F002BBB55000A7913000F5F090000000000000000000000
00000000000000000000000000000000000000000000000000000066000036C2
5C0043DC76003CD56F002BBB55000A7913000F5F090000000000000000000000
00000000000000000000000000000000000000000000000000000066000036C2
5C0043DC76003CD56F002BBB55000A7913000F5F090000000000000000000000
00000000000000000000000000000000000000000000000000000066000036C2
5C0043DC76003CD56F002BBB55000A7913000F5F090000000000000000000000
0000000000000000000000000000000000000000000000000000006600003DC9
630049E27C0025A84200046D07002D581E000000000000000000000000000000
0000000000000000000000000000000000000000000000000000006600003DC9
630049E27C0025A84200046D07002D581E000000000000000000000000000000
0000000000000000000000000000000000000000000000000000006600003DC9
630049E27C0025A84200046D07002D581E000000000000000000000000000000
0000000000000000000000000000000000000000000000000000006600003DC9
630049E27C0025A84200046D07002D581E000000000000000000000000000000
0000000000000000000000000000000000000000000000000000006600003CC5
5F00158721000961050000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000006600003CC5
5F00158721000961050000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000006600003CC5
5F00158721000961050000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000006600003CC5
5F00158721000961050000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000006600000066
0000245E19000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000006600000066
0000245E19000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000006600000066
0000245E19000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000006600000066
0000245E19000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000660000245E
1900000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000660000245E
1900000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000660000245E
1900000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000660000245E
1900000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000BA877700CE7E6200D07E5D00D07E
5D00CE7E6200C396880000000000000000000000000000000000006600004D4D
4D00000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000006600004D4D
4D00000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00000000000000000000B7A5A2008D6F6A008D6F6A008D6F6A008D6F6A00A28A
8600BFAEAB000000000000000000000000000000000000000000000000000000
0000000000000000000000000000CF795600EDB18D00F3BC9900F1BA9600F0B7
9400F0B79400E5A07D00CA715200000000000000000000000000006600000066
00004D4D4D004D4D4D0000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000006600000066
00004D4D4D004D4D4D0000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000C5B6
B4009B817C0093757000B8979100DDB9B200C09E9800BD9E9800BD9D9700AA8B
850091746F008D6F6A0000000000000000000000000000000000000000000000
00000000000000000000CD795D00F1A77B00EFA47800EDA07400EB9B7000DA83
5D00DD886000E4906600DA835D00E4BAAC000000000000000000006600000D90
1A00026F0400165D0E004D4D4D00000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000006600000D90
1A00026F0400165D0E004D4D4D00000000000000000000000000000000000000
00000000000000000000000000000000000000000000A9928E008D6F6A00AA8B
8500D1AEA700F0CAC200F0CAC200F0CAC200E9C7C100F3D3CC00F3D3CC00F0CA
C200D6B3AC008D6F6A00000000000000000000000000000000005D9D5F003B9E
3500409F33003B9E3500C06F4400F4A17000F19C6C00ED956600E2875A00C56A
4D00D06E4700E2845600E2845600E1B3A50000000000000000000066000014A0
270016AB2B0007840F00056303004D4D4D004D4D4D0000000000000000000000
00000000000000000000000000000000000000000000000000000066000014A0
270016AB2B0007840F00056303004D4D4D004D4D4D0000000000000000000000
00000000000000000000000000000000000000000000997A7500EAC4BD00F0CA
C200F0CAC200F0CAC200F0CAC200F0CAC200EBCBC600F4D7D100F3D3CC00F3D3
CC00D6B3AC008D6F6A000000000000000000000000002395240061B9510074C2
5F007AC9690080CF7200B47A4900F9AA7800F4A17000F19C6C00CA715200E7C7
C100CB6A4700E88D5E00DF805500E6C0B40000000000000000000066000019A5
32001CB5360017B02D000C951700016A02001A5C11004D4D4D00000000000000
00000000000000000000000000000000000000000000000000000066000019A5
32001CB5360017B02D000C951700016A02001A5C11004D4D4D00000000000000
00000000000000000000000000000000000000000000A6868000F0CAC200F0CA
C200F0CAC200F0CAC200F0CAC200F0CAC200D6B3AC00C5ADA900CDB5B000D7BD
B700BD9E98008D6F6A000000000000000000000000000B99170018AB29000B93
15001BA52A0033C850007A934700EC986A00F9AA7800D0734E00ECD0C800F4E7
E500CE7E6200ED956600D3734B00000000000000000000000000006600001FAB
3D0022BB44001CB5360017B02D000FA51E0003790600096105004D4D4D000000
0000000000000000000000000000000000000000000000000000006600001FAB
3D0022BB44001CB5360017B02D000FA51E0003790600096105004D4D4D000000
00000000000000000000000000000
(0)

相关推荐

  • Delphi实现窗体感知鼠标滑过并自动隐藏与显示窗口的方法

    本文实例讲述了Delphi实现窗体感知鼠标滑过并自动隐藏与显示窗口的方法.分享给大家供大家参考.具体实现方法如下: const WM_MouseEnter = $B013; WM_MouseLeave = $B014; type TfrmMain = class(TForm) . . Timer1: TTimer; procedure Timer1Timer(Sender: TObject); protected procedure WMMouseEnter(var Msg: TMessage)

  • Delphi实现截屏存盘的方法

    本文实例讲述了Delphi实现截屏存盘的方法.分享给大家供大家参考.具体分析如下: 该实例可实现截取屏幕,并保存为JPEG文件格式的功能. procedure TForm1.ScreenCap(LeftPos,TopPos,RightPos,BottomPos:integer); var RectWidth,RectHeight:integer; SourceDC,DestDC,Bhandle:integer; Bitmap:TBitmap; MyJpeg: TJpegImage; Stream

  • Delphi 中内存映射对于大文件的使用

    Delphi 中内存映射对于大文件的使用 平时很少使用大文件的内存映射,碰巧遇到了这样的要求,所以把过程记录下来,当给各位一个引子吧,因为应用不算复杂,可能有考虑不到的地方,欢迎交流. 对于一些小文件,用普通的文件流就可以很好的解决,可是对于超大文件,比如2G或者更多,文件流就不行了,所以要使用API的内存映射的相关方法,即使是内存映射,也不能一次映射全部文件的大小,所以必须采取分块映射,每次处理一小部分. 先来看几个函数 CreateFile :打开文件 GetFileSize : 获取文件尺

  • Delphi 根据字符串找到函数并执行的实例

    Delphi 根据字符串找到函数并执行的实例  关键字:MethodAddress:取得方法的地址,这个方法需要是published的. 实例代码: unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TShowInfo = procedure(info:string) of object; //声

  • Delphi 用DLL实现插件的简单实例

    Delphi 用DLL实现插件的简单实例 这是DLL的代码 实现代码: library MyDll; uses SysUtils, Dialogs, Classes; procedure ShowInfo(info:PChar);stdcall; begin ShowMessage('您选择了['+info+']'); end; function GetCaption:Pchar; begin Result := '中国'; end; exports ShowInfo, GetCaption;

  • Delphi提取PDF文本实例

    生成PDF的控件很多,但解析的不是太多,pdf Toolkit可以,但测试的第一个复杂的pdf就报告错误,并且汉字乱码,可能使用的版本或使用方法不对. 想起之前使用java调用的Apache名下的pdfBox库很好用,于是就用下载了pdfBox,使用Delphi来调用pdfBox解析pdf文本. 环境要求:java运行环境 pdfBox应用包:pdfbox-app-2.0.6.jar 这里使用了DOS命令行来解析,然后调用解析结果. 首先是执行DOS命令: procedure CheckResu

  • Delphi 实现软件自动升级的功能

    Delphi 实现软件自动升级的功能 原理简单,在FTP上维护一个Update.ini文件,里面记录着要更新文件的版本号,本地也有一个Update.ini文件,每次启动更新程序时,先从FTP上下载Update.ini文件到本地名字为Update_new.ini,然后比较这两个文件,如果新的版本号大于旧的,或者新的文件在就ini中没有,这些就表示要更新的文件,然后逐一下载. 本程序名字为AutoUpdate,你生成这个exe,然后和主程序一起打包,创建桌面快捷方式时,指向AutoUpdate,而不

  • Delphi XE5 为Android应用制作签名的方法(图文)

    要发布android应用,必须做签名的.看一下具体的操作步骤: 1.进入Project-Options: 2.打开Options窗口,选择Provisioning,在这里,可以为目标平台选择签名文件,也可生成新的签名文件. 2.1 选择目标平台,可以为dubug或release设置签名,默认情况下,debug签名文件是存在的,可不用设置,这也是我们建立一个新的Android项目,就可以不用签名就能在模拟器上跑的原因,真正发布时,是必须做签名的. 2.2,为发布做一个新的签名,选择Target为R

  • ListView 百分比进度条(delphi版)

    在看代码之前先给大家附上效果图: 废话不多说了,直接给大家贴代码了. unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ComCtrls, ImgList; type TForm1 = class(TForm) btn1: TButton; lv1: TListView; trckbr1: TTrackBa

  • 使用Ajax实现简单的带百分比进度条实例

    需求:当进行文件长传保存等操作时,能在页面显示一个带百分比的进度条,给用户一个好的交互体验 实现步骤 JSP页面 1.添加table标签 <table id="load" width="700" border="0" align="center" bgcolor="#FAFAFA" cellpadding="0" cellspacing="0" borderco

  • jQuery实现的简单百分比进度条效果示例

    本文实例讲述了jQuery实现的简单百分比进度条.分享给大家供大家参考,具体如下: 一.JS Code: <script type="text/javascript"> var progressId = "ProgressBarID"; function setProgressBar(progress) { if (progress) { $("#" + progressId + " > div").css(

  • jquery实现模拟百分比进度条渐变效果代码

    本文实例讲述了jquery实现模拟百分比进度条渐变效果代码.分享给大家供大家参考,具体如下: 这里为了便于看到加载百分比,对代码进行了处理,实际使用时并不需要这样. 运行效果截图如下: 在线演示地址如下: http://demo.jb51.net/js/2015/jquery-mn-bfb-scroll-cha-style-demo/ 具体代码如下: <html> <head> <title>jquery模拟百分比进度条</title> <script

  • vue圆环百分比进度条组件功能的实现

    有需要的人可以参考一下,如果试用过,发现问题,欢迎留言告知,不胜感激. 功能介绍: 1.若页面无刷新,且第一次传值小于第二次传值或者圆环初始化时执行的是递增动画 2.若页面无刷新,且第一次传值大于第二次传值则为执行递减动画 3.中间展示的百分比数字有缓动动画(速度同圆环进度动画一直) 4.动画完成时会触发动画完成回调 5.外部传值为圆环进度百分比(整数),圆环动画速度(整数) 效果如图所示: <template> <div class="percentloop">

  • Vue实现动态圆环百分比进度条

    最近在开发小程序的时候,碰到一个实现圆环百分比进度条的需求,类似如下设计图: 小白的我感觉实现起来有难度,于是上百度看看别人是怎么做的,结果没找到一个满意的,要不是静态的实现,就是需要用到比较多的DOM操作,小程序还是尽量避免直接操作DOM. 下面是我以Vue组件形式做的一个动态的实现,先上效果图: 效果 实现步骤 画一个饼图 .pie { display: inline-block; position: relative; width: 150px; height: 150px; margin

  • jQuery实现html可联动的百分比进度条

    最近需要一个HTML可以联动的百分比进度条,网上找了一下没有,自己手动实现了一个. 需要解决的问题,AB两个进度条需要按照百分比A+B=100%,A进度条可以拖动,B进度条联动,并且有进度颜色的变化.实现功能如下: HTML代码: <div class="percentage-container" > <div class="a-percentage" data-x='30'> <div class="a-percentage

  • Android自定义View实现水平带数字百分比进度条

    这个进度条可以反映真实进度,并且完成百分比的文字时随着进度增加而移动的,所在位置也恰好是真实完成的百分比位置,效果如下: 思路如下:第一部分是左侧的蓝色直线,代表已经完成的进度:第二部分是右侧灰色的直线,代表未完成的进度:第三部分是红色的百分比的数字百分比文本,显示当前确切的完成进度. 最关键的部分就是要确定百分比文本的确切位置,这里用了paint的getTextBounds方法,得到文本的宽高,然后再精确确定它的位置. view代码如下: public class NumberProgress

  • Android自定义View实现圆环带数字百分比进度条

    分享一个自己制作的Android自定义View.是一个圆环形状的反映真实进度的进度条,百分比的进度文字跟随已完成进度的圆弧转动.以下是效果图: 这个自定义View可以根据需要设定圆环的宽度和百分比文字的大小. 先说一下思路:这个View一共分为三部分:第一部分也就是灰色的圆环部分,代表未完成的进度:第二部分是蓝色的圆弧部分,代表已经完成的进度:第三部分是红色的百分比的数字百分比文本,显示当前确切的完成进度. 下面是View的编写思路: ①:定义三个画笔,分别画灰色圆环,蓝色圆弧,红色文字: ②:

  • java控制台输出百分比进度条示例

    System.out.print("\b") 会在控制台下往回删掉一个字符,如果你想回删多个字符就打印多个 "\b" 复制代码 代码如下: public static void main(String[] args) throws Exception {    System.out.print("Progress:");    for (int i = 1; i <= 100; i++) {        System.out.print(

随机推荐