随笔分类 -  Delphi

上一页 1 2

发送消息执行方法函数(消息函数)
摘要:1. 定义方法函数: procedure InitRunParam(var Msg: TMessage); message WM_USER + 1110; //参数类型是固定的; message WM_USER + 1110 数字可变.或定义为常量: const WM_REFRESH_STATE = 阅读全文

posted @ 2018-09-14 10:07 liuweijie

捕获报错信息
摘要:1. showmessage(inttostr(getlasterror));2. ApplicationEvents1:控件: 在该控件的OnException事件中写代码: showmessage(inttostr(getlasterror)); showmessage(e.Message);但 阅读全文

posted @ 2018-09-14 10:04 liuweijie

ini文件读写
摘要://创建对象:iniFile:=TIniFile.Create(strFile);//写入procedure IEAddFavUrl(FURL, Title: string);var fPath: string;begin fPath := GetFavoritesPath; with TIniFi 阅读全文

posted @ 2018-09-14 10:02 liuweijie

delphi连接mysql (通过libmysql.dll连接)
摘要:首先在窗体上拖拽sqlconnection和sqlquery两个控件: 然后在测试连接中,写入以下代码(注意exe生成目录下需要有dbxopenmysql50.dll和libmysql.dll) SQLConnection1 := TSQLConnection.Create(nil); SQLCon 阅读全文

posted @ 2018-09-14 09:27 liuweijie

上一页 1 2