随笔 - 583  文章 - 0  评论 - 31  阅读 - 90万

随笔分类 -  Delphi

1 2 下一页
Delphi - IndyHttpServer接收上传文件
摘要:procedure TForm1.IdHTTPServerCommandGet(AContext: TIdContext; ARequestInfo: TIdHTTPRequestInfo; AResponseInfo: TIdHTTPResponseInfo); var FileStream: T 阅读全文
posted @ 2021-02-19 11:03 sunylat 阅读(1161) 评论(1) 推荐(0) 编辑
Delphi - 生成GUID
摘要:uses SysUtils; // 生成GUID function TForm2.GetGUID: string; var LTep: TGUID; sGUID: string; begin CreateGUID(LTep); sGUID := GuidToString(LTep); sGUID : 阅读全文
posted @ 2021-02-11 14:47 sunylat 阅读(494) 评论(0) 推荐(0) 编辑
Delphi - IndyHttpServer服务器接收数据最大值设置!!
摘要:MaxLineLength参数决定当前接收数据的最大值,如果当前接收数据比较大,大于:16*1024,那么可以参照下面代码设置: procedure TForm1.IdHTTPServer1CommandGet(AContext: TIdContext; ARequestInfo: TIdHTTPR 阅读全文
posted @ 2021-02-01 17:05 sunylat 阅读(451) 评论(0) 推荐(0) 编辑
Delphi - exit、break、continue等跳出操作的区别
摘要:Delphi中表示跳出的有break,continue,abort,exit,halt,runerror等 1.break 强制退出最近的一层循环(注意:只能放在循环里;而且是只能跳出最近的一层循环),用于从for、while、repeat语句中强制退出 类似于C/C++等语言中的break的功能 阅读全文
posted @ 2020-12-18 17:13 sunylat 阅读(267) 评论(0) 推荐(0) 编辑
Delphi - TStringList DelimitedText空格问题
摘要:使用TStringList 的 DelimitedText ,如果被分割字符串中包含空格,被自动分割,这恐怕不是想要的结果,解决办法:用自定义的分割函数! 1 function SplitString(const Source, ch: String): TStringList; 2 var 3 T 阅读全文
posted @ 2020-11-25 11:41 sunylat 阅读(619) 评论(0) 推荐(0) 编辑
Delphi - Application.MessageBox
摘要:Application.MessageBox是TApplication的成员函数,声明如下:functionTApplication.MessageBox(constText,Caption:PChar;Flags:Longint):Integer;引数:1.Text:要显示的信息2.Caption 阅读全文
posted @ 2020-11-14 10:59 sunylat 阅读(392) 评论(0) 推荐(0) 编辑
Delphi - reference to (匿名方法)
摘要:Delphi 2009 可以使用匿名方法了(使用 reference 定义方法类型, 然后在代码中随用随写方法) unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls 阅读全文
posted @ 2020-11-10 17:00 sunylat 阅读(387) 评论(0) 推荐(0) 编辑
Delphi - Record记录和变体记录
摘要:原文地址:https://blog.csdn.net/yt_maomao/article/details/36631133 //Integer类型刚好是4个字节,ShortInt类型是1个字节,但是Windows中内存是4字节分配,//所以这里其实还是4个字节,用SizeOf可以看到这个record 阅读全文
posted @ 2020-11-10 11:50 sunylat 阅读(1551) 评论(0) 推荐(0) 编辑
Delphi - TStringBuilder类
摘要://TStringBuilder.Create 可以无参数 procedure TForm1.Button1Click(Sender: TObject); var sb: TStringBuilder; begin sb := TStringBuilder.Create; sb.Append('Em 阅读全文
posted @ 2020-11-09 18:11 sunylat 阅读(330) 评论(0) 推荐(0) 编辑
Delphi - Format
摘要:1.Format 根据指定所需要的格式,格式化字符串。 原型: function Format(const Format: string; const Args: array of const): string; 例子: var s: string; begin //指令类型 type s := F 阅读全文
posted @ 2020-11-09 13:24 sunylat 阅读(328) 评论(0) 推荐(0) 编辑
Delphi - 如何调试 DLL
摘要:网上看到很多人问delphi中如何调试 DLL 的,众大侠回答也基本一致,但是,我使用时却时灵时不灵,今天发现了原因。 完整的调试 DLL方法如下: 1)新建一个 DLL 工程,名字就叫 MyDll 吧,编译后生成 MyDll.dll,我们要调试的就是它了。 2)新建一个用来调试 MyDll 的 A 阅读全文
posted @ 2020-11-04 20:16 sunylat 阅读(519) 评论(0) 推荐(0) 编辑
Delphi - TStringList 用法详解
摘要:delphi TStringList 用法详解 //TStringList 常用方法与属性 :var List: TStringList; i: Integer;begin List := TStringList.Create; List.Add('Strings1'); {添加} List.Add 阅读全文
posted @ 2020-11-04 15:00 sunylat 阅读(785) 评论(0) 推荐(0) 编辑
Windows下如何让非NT程序像NT程序一样毫无踪迹在后台运行?
摘要:Windows版本:Windows 10 Delphi版本:Delphi 10.3 需求说明:让正常的图形界面程序或DOS程序,能够彻底隐藏踪迹,像NT程序一样在后台悄悄运行!!正常的程序,如果在运行时候,会有程序窗口,如果加入了在任务栏显示代码,最小化会在任务栏有图标!!这些我都不想要,我就想让这 阅读全文
posted @ 2020-09-09 10:36 sunylat 阅读(587) 评论(0) 推荐(0) 编辑
Delphi - indy10访问https网站的方法!!!
摘要:Delphi:10.3 Indy :10.6.2 尽情享受拿着好代码直接用的幸福吧!!!先直接上代码吧?下面代码已经经过充分测试,加入足够多的注释,包括各处关键代码如果不存在会发生什么类型的错误的注释!!! //需要引入的单元uses IdBaseComponent, IdComponent, Id 阅读全文
posted @ 2020-09-01 01:29 sunylat 阅读(2450) 评论(0) 推荐(0) 编辑
Delphi - ISuperObject如何将保持的JSON格式化?
摘要:{ 把JSON赋值给list 注意:jo.AsJSon(true, false)里面的两个参数,第一个为true,才会输出格式化好的JSON } ConfigList.Text := jo.AsJSon(true, false); 参考: https://stackoverflow.com/ques 阅读全文
posted @ 2020-05-18 21:29 sunylat 阅读(597) 评论(0) 推荐(0) 编辑
Delphi - TStringList保存的文件如何避免保持为UTF-8 BOM格式?
摘要://要执行保持的TStringList ConfigList //要保存到的文件名 ConfigFile //这句话是关键,确保保存后的文件是UTF-8,不是UTF-8 BOM格式 ConfigList.WriteBOM := false; ConfigList.SaveToFile( Config 阅读全文
posted @ 2020-05-18 21:28 sunylat 阅读(1129) 评论(0) 推荐(0) 编辑
Delphi - FireDAC的连接配置
摘要:http://docwiki.embarcadero.com/RADStudio/XE8/en/Defining_Connection_(FireDAC) http://docwiki.embarcadero.com/RADStudio/XE8/en/Working_with_Connections 阅读全文
posted @ 2019-08-14 13:35 sunylat 阅读(395) 评论(0) 推荐(0) 编辑
Delphi - ShellExecute资料
摘要:Windows官方资料: https://docs.microsoft.com/en-us/windows/win32/api/shellapi/nf-shellapi-shellexecutea#parameters ShellExecute - 打开外部程序或文件 https://www.cnb 阅读全文
posted @ 2019-08-14 08:40 sunylat 阅读(185) 评论(0) 推荐(0) 编辑
Delphi - 程序运行时不显示主窗体
摘要:// 不显示主窗体 Application.ShowMainForm := False; 阅读全文
posted @ 2019-05-25 15:15 sunylat 阅读(843) 评论(0) 推荐(0) 编辑
Delphi - TDateTimePicker使用注意问题
摘要:TDateTimePicker使用时候,如果想获取到修改后的值,必须注Kind和time属性必须对应! 1,时间设置: 2,日期设置: 得到上面两个控件的日期和时间 参考: https://www.cnblogs.com/hellochenchen/p/5438497.html https://if 阅读全文
posted @ 2019-04-23 14:20 sunylat 阅读(1575) 评论(0) 推荐(0) 编辑

1 2 下一页
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示