-
Delphi 使用tfilestream方式复制文件
Delphi 使用tfilestream方式复制文件,你可参考本源码,学习一下OpenDialog、Tfilestream.Create、showmessage、CopyFile的用法,本实例复制文件,是通过读取文件流,保存文件流的方式复制,并不是使用命令复制文件。
- 2022-01-21 03:12:02下载
- 积分:1
-
Delphi获取电脑CPU硬件型号名称
Delphi获取电脑CPU硬件型号名称,这个可能不准确,我是64位 I5 3470 CPU,获取出来的是统称,不是太准确,可能是我系统的问题。不过这个代码是前几年书中的代码,现在的硬件发展快,也有可能是代码的问题,运行效果如下。
本获取CPU名称是根据注册表的方法获取的。
- 2022-07-06 23:12:47下载
- 积分:1
-
Delphi 打印图形(图片)
Delphi 打印图形,把图片打印出来,通过这个例子,你可以学习到:
strect:Trect;//定义打印输出矩形框的大小
temhi,temwd:integer;
begin
if DIGPrint.execute then
begin
temhi:=imgpic.picture.height;
temwd:=imgpic.picture.width;
while (temhi = printer.pageheight div 2)and
//将图形放大到打印页面的1/2大小
(temwd = printer.pagewidth div 2) do
begin
temhi:=temhi+temhi;
temwd:=temwd+temwd;
end;
with strect do //定义图形在页面上的中心位置输出
begin
left := (printer.pagewidth -temwd) div 2;
top := (printer.pageheight-temhi) div 2;
right := left+temwd;
bottom := top+temhi;
end;
with printer do
begin
begindoc;
canvas.stretchdraw(strect,imgpic.picture.graphic);
enddoc;
end;
end;
- 2022-10-24 23:35:04下载
- 积分:1
-
Delphi 渐变的RGB空心色环绘制源码演示
Delphi渐变圆形的实现方法,RGB色环空心绘制演示源码:
oBmp := TBitmap.Create; //为了代码整齐就不写try了
oBmp.PixelFormat := ABitmap.PixelFormat;
oBmp.Width := ABitmap.Width;
oBmp.Height := ABitmap.Height;
BitBlt(oBmp.Canvas.Handle, 0, 0, oBmp.Width, oBmp.Height, ABitmap.Canvas.Handle, 80, 80, SRCCOPY); //要拷贝的位图
oRgn := CreateEllipticRgn(0, 0, 100, 100); //创建圆形区域
SelectClipRgn(ABitmap.Canvas.Handle, oRgn); //选择剪切区域
ABitmap.Canvas.Draw(0, 0, oBmp); //位图位于区域内的部分加载
- 2022-03-21 13:09:53下载
- 积分:1
-
Delphi+Interbase-Code-汽配进销存源码-源代码全-使用手册-钻石精品
(R)-Delphi+Interbase-Code-龙邦汽配进销存源码-源代码全-使用手册-钻石精品
- 2022-03-16 11:47:13下载
- 积分:1
-
Delphi 绘制艺术图案
Delphi 绘制标准的艺术图案,是比较有规则的几何图案,如示例截图所示的样式 。
self.ClientHeight:=200;
self.ClientWidth:=200;
r:=self.ClientWidth/2;
Sect:=20;
for i:=0 to Sect-1 do
begin
x[i]:=Trunc(r*Cos(i*2*PI/Sect)+self.ClientWidth/2);
y[i]:=Trunc(r*Sin(i*2*PI/Sect)+self.ClientHeight /2);
end;
- 2022-01-28 10:36:40下载
- 积分:1
-
Delphi 演示0~N位数的任意组合
Delphi 数列的排列组合一例,演示0~N位数的任意组合,组合的数字在0~5之间,需要输入1~6整数,排列结果会显示在文本框组件中。要点代码如下:
ssList := TStringList.Create;
try
if (nBase < 1) then
begin
end
else
begin
if (sList.Count = 0) then
begin
for nIdx := 0 to num-1 do
ssList.Add(a[nIdx]);
end
else
begin
for nIdx := 0 to num-1 do
for nSidx := 0 to sList.Count-1 do
if (Pos(a[nIdx], sList.Strings[nSidx]) = 0) then
ssList.Add(a[nIdx]+sList.Strings[nSidx]);
end;
Combine(nBase-1, ssList);
end;
if ssList.Count > 0 then
begin
sList.Clear;
sList.Text := ssList.Text;sslist.Count
end;
finally
ssList.Free;
end;
- 2022-04-29 16:59:03下载
- 积分:1
-
delphi 获取网页源码
delphi 获取网页源码
- 2023-01-22 10:05:04下载
- 积分:1
-
Delphi 主窗体和子窗体显示示例
Delphi 主窗体和子窗体显示示例,这类功能在平时的delphi编程中也是十分常见的,我们需要在主窗口中添加一个按钮,点击后弹出一个子窗口,对窗口布局来说是一种扩展。本示例简单,适合初学者学习参考。
- 2023-01-23 15:15:08下载
- 积分:1
-
Delphi 格式化DataGrid表格中的数据
Delphi 格式化DataGrid表格中的数据,DataGrid网格列表在各种编程的数据库显示方面都使用广泛,因此对于Delphi的数据库编程,DataGrid的使用技巧是一定要撑握的,本源码所要演示的就是一个使用DataGrid的简单例子,将DataGrid表格中的数据格式式成你想要的格式,测试前请确保Delphi与数据库正常连接且有数据。
- 2022-01-25 15:23:01下载
- 积分:1