基本信息
源码名称:仿任务管理器cpu占用显示
源码大小:0.38M
文件格式:.zip
开发语言:Pascal
更新时间:2017-02-26
友情提示:(无需注册或充值,赞助后即可获取资源下载链接)
嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300
本次赞助数额为: 2 元×
微信扫码支付:2 元
×
请留下您的邮箱,我们将在2小时内将文件发到您的邮箱
源码介绍
仿任务管理器cpu占用显示
仿任务管理器cpu占用显示
procedure TForm1.DrawPL(Shower:TImage); //主要源码 var Bit: TBitmap; i: Integer; PW,PH: Integer; YValue:Integer; begin //偏移量计算 Inc(X); if X = GridSpace div MoveStep then X := 0; //初始化画布(双缓冲) Bit := TBitmap.Create; try PW := Shower.Width; PH := Shower.Height; Bit.Width := PW; Bit.Height := PH; //初始化网格竖线X坐标数组长度为宽/间隔 1 SetLength(GridXPArr,PW div GridSpace 1); with Bit.Canvas do begin Brush.Color := clBlack; Brush.Style := bsSolid; Rectangle(0,0,PW,PH); Pen.Color := $00408000; //画网格,根据偏移量实现动态效果 for i := 0 to PW div GridSpace 1 do begin GridXPArr[i] := GridSpace * i - X * MoveStep; MoveTo(GridXPArr[i],0); LineTo(GridXPArr[i],PH); end; for i := 0 to PH div GridSpace do begin MoveTo(0,GridSpace * i); LineTo(PW,GridSpace * i); end; //画折线 Pen.Color := clLime; YValue := 0; //如果队列中有新的Y坐标点,则输出 if YPQueue.Count > 0 then begin PYValue := YPQueue.Pop; YValue := PYValue^; Dispose(PYValue); end; //画笔移动到起点位置 MoveTo(0,PH); //每执行一次函数,Y坐标向前移动一位,并连线各个点 for i := 0 to Length(PointLst) - 2 do begin PointLst[i].Y := PointLst[i 1].Y; LineTo(PointLst[i 1].X,PointLst[i 1].Y); end; //按比例更新最后一位坐标点 PointLst[Length(PointLst)-1].X := PW; PointLst[Length(PointLst)-1].Y := PH - (YValue * PH div MaxY); //打印信息(可根据需要调整显示位置和内容) Brush.Style:=bsClear; Font.Color:=clYellow; TextOut(10,10,'数值:' inttostr(YValue)); end; Shower.Canvas.Draw(0,0,Bit); finally Bit.Free; end; end;