安装10.4.2版本,安装完成后,使用防火墙关闭IDE的网络连接
名词 | 释义 |
---|---|
dpr | delphi project的后缀,dpr文件包含启动程序的Pascal代码,dproj文件包含XML格式配置信息。 |
pas | 代码文件的后缀 |
dfm | visual form文件的后缀 |
VCL | Visual Component Library |
下述的方法一和方法二对于Delphi10.4无效,
通过删除startpageguide相关文件可以在delphi启动时关闭欢迎页,不过在启动之前会提示startpageguide.bpl丢失
经试验,在下述路径中找到了对应的注册表项,删除之,在启动之前就没有再提示startpageguide.bpl丢失了
将Source文件夹中的文件添加到Delphi104文件夹中,并在library path中添加Delphi104,之后打开Delphi104_64中的dpr工程,进行编译安装
尝试了几次,提示能安装成功,但是在palette中无法看到如下的图,
在网上荡了一圈,有人也出现过装组件后无法图标显示的问题,是通过清注册表中的cache后变好的;照做了一番,没有变化;于是又折腾了好一会,未果;推敲安装的版本,发现桌面delphi 10.4图标指向的是32位的版本,那么是不应该安装64位版本的,于是又接着对32位的进行编译安装,始终不成功;后来,在Delphi102文件夹中编译安装,成功显示图标了。
procedure TForm1.btn1Click(Sender: TObject);
varfid: File;byteArray: array [0 .. 1023] of u8_t;ucData: u8_t;i: u32_t;byteArray2: array [0 .. 7] of u8_t;
beginfor i := 0 to 1023 dobeginbyteArray[i] := u8_t(i);end;{第一类测试:向一个文件中每次写入1个字节}AssignFile(fid, 'test_1.bin');ReWrite(fid, 1); // 每次写入的数量为1个字节的整数倍for i := 0 to 1023 dobeginBlockWrite(fid, byteArray[i], 1);end;CloseFile(fid);{第二类测试:向一个文件中每次写入4个字节}AssignFile(fid, 'test_2.bin');ReWrite(fid, 4); // 每次写入的数量为4个字节的整数倍for i := 0 to 16 dobeginBlockWrite(fid, byteArray[i * 2], 1);BlockWrite(fid, byteArray[i * 4], 1);end;CloseFile(fid);{第三类测试:从文件中每次读出1个字节}AssignFile(fid, 'test_1.bin');ReSet(fid, 1); // 每次读出的数量为1个字节的整数倍for i := 0 to 7 dobeginBlockRead(fid, ucData, 1);ShowMessage(IntToStr(ucData));end;CloseFile(fid);{第四类测试:从文件中每次读出2个字节}AssignFile(fid, 'test_1.bin');ReSet(fid, 2); // 每次读出的数量为2个字节的整数倍for i := 0 to 7 dobeginBlockRead(fid, byteArray2, 1);ShowMessage(u16_2_hexStr(u8_2_u16(byteArray2[0], byteArray2[1])));end;CloseFile(fid);
end;procedure TForm1.btn2Click(Sender: TObject);
varfid: TextFile;text: string;i: u32_t;
beginAssignFile(fid, 'test.txt');ReWrite(fid);Write(fid, 'Hello ');Write(fid, 'World');WriteLn(fid); // WriteLn会写入换行符// Write some numbers to the file as a single linefor i := 2 to 4 dobeginWrite(fid, i / 2, ' ');end;WriteLn(fid);for i := 2 to 4 dobeginWrite(fid, i);end;WriteLn(fid);for i := 2 to 4 dobeginWrite(fid, i / 2:5:1);end;WriteLn(fid);CloseFile(fid);// 重新打开文件,用于读取ReSet(fid);while not Eof(fid) dobeginReadLn(fid, text);ShowMessage(text);end;CloseFile(fid);
end;
procedure CreateExcelFile;
varxls: TXlsFile;
begin// Create a new empty Excel file, with default formatting as if it was created by Excel 2019.// Different Excel versions can have different formatting when they create// an empty file, so for example// Excel 2003 will have a default font of Arial, and 2019 will use Calibri.// This format is anyway the starting format, you can change it all later.xls := TXlsFile.Create(1, TExcelFileFormat.v2007, true);tryxls.SetCellValue(1, 1, 'Just A Try'); //向A1中写入字符串xls.SetCellValue(2, 1, 7); //注意,如果使用xls.SetCellValue(2, 1, '7'),则会输入字符串'7'xls.SetCellValue(3, 1, 11.3); //Excel中的所有数字都是浮点数,所以即使你输入一个整数,它也会被存储为双精度数。xls.SetCellValue(4, 1, TFormula.Create('=Sum(A2:A3)')); //使用公式xls.Save('test.xlsx'); //保存文件finallyxls.Free;end;
end;
注意,可以在设置状态栏panel[i]文本的同时,设置宽度;该属性可以动态设置。
对于语法不同熟悉,但对C比较了解,就使用该软件进行语法转换,可以比较快的上手,
该例子使用了TDBGrid、TComboBox、TBitBtn、TPageControl、TToolBar、TStatusBar
该例子使用了TDateTimePicker
Vcl.Dialogs.ShowMessage
Delphi组件安装错误
Delphi 10.3MitovLabs VCL 控件包关于“E2225: Never-build package ‘Mitov_Runtime.dpk’ must be recompiled”的问题
Delphi 10.4 Sydney Release Notes
Delphi10.2 DPR文件
Delphi10.2 VCL Forms Application 的构成
设定Delphi环境选项
下一篇:逻辑漏洞笔记