摘要:
1.String转化成PChar例:var str: string; pStr:PChar;...pStr := PChar(str);2.PChar转String例:varpStr:PChar; str:string;...str := strPas(pStr); 阅读全文
摘要:
listbox1.Items.IndexOf('重复的字符')= -1 表示没有重复 阅读全文
摘要:
for i:=1 to stringgrid.rowcount do for j:=1 to stringgrid.colcount do stringgrid.cells[j-1,i-1]:=''; 阅读全文
摘要:
delphi编程修改ProgressBar的颜色关键代码如下:usesCommCtrl;procedure TForm1.Button1Click(Sender: TObject);begin// Set the Background color to tealProgressbar1.Brush.Color := clTeal;// Set bar color to yellowSendMess... 阅读全文
摘要:
uses WinSock; function LocalIP: String; type TaPInAddr = Array[0..10] of PInAddr; PaPInAddr = ^TaPInAddr; var phe: PHostEnt; pptr: PaPInAddr; Buffer: Array[0..63] of AnsiChar; i: ... 阅读全文
摘要:
with adoquery dobeginclose;sql.clear;sql.text:=' insert into test (FieldName) values (:FieldName) ';Parameters.ParamByName('FiledName').Value := UTF8Encode('中文(简体/繁體)');ExecSQL;end; 阅读全文
摘要:
ShellExecute的各种用法一、利用系统默认的邮件收发器发送电子邮件Uses..., ShellAPI;VarlpHwnd: HWND;lpOperation, lpFile, lpParameters, lpDirectory: String;BeginlpHwnd:= GetDesktopWindow();lpOperation:= 'open';lpFile:= 'mailto:' +... 阅读全文
摘要:
对于通过Byte数组进行文件操作的,在FTP中经常会使用到,我也是在Delphi调用Web Service进行文件的上传和下载时找到这两个函数的,挺好用的,推荐给大家。(申明:非本人所写)1. 将Byte数组生成文件procedure ByteArrayToFile(const ByteArray : TByteDynArray; const FileName : string );varCoun... 阅读全文