随笔分类 -  Delphi

摘要:某一字符是否在字符串中 本实例是用AnsiMidstr()函数获取指定字符串中的单个字符,也可以获取指定长度的子字符串。运行结果如图5.10所示。 图5.10 判断某一字符是否在字符串中 主要代码如下: procedure TForm1.Button1Click(Sender: TObjec... 阅读全文

posted @ 2011-09-17 13:43 清风轩 阅读(1426) 评论(0) 推荐(0) |

摘要:字符串转换成16进制字符串 实例Function StrToHexStr(const S:string):string;//字符串转换成16进制字符串var I:Integer;begin for I:=1 to Length(S) do begin if I=1 then Result:=Int... 阅读全文

posted @ 2011-09-17 12:03 清风轩 阅读(248) 评论(0) 推荐(0) |

摘要:字符串转换成16进制字符串 function StrToHexStr(const S:string):string;var I:Integer;begin for I:=1 to Length(S) do begin if I=1 then Result:=IntToHex(Ord(S[1... 阅读全文

posted @ 2011-09-17 01:46 清风轩 阅读(287) 评论(0) 推荐(0) |

摘要:16进制字符串转换成字符串 function HexStrToStr(const S:string):string;var t:Integer; ts:string; M,Code:Integer;begin t:=1; Result:=''; while tLength(S))or... 阅读全文

posted @ 2011-09-13 21:01 清风轩 阅读(273) 评论(0) 推荐(0) |

摘要:在Windows程序设计中WinAPI也为我们提供了类似的函数,它们就是WinExec()和ShellExecute(),下面就来讨论一下这两个函数的用法。 1)WinExec() 函数原型: UINT WinExec(LPCSTR lpCmdLine,UINT uCmdShow); 参数说明:... 阅读全文

posted @ 2011-09-10 17:34 清风轩 阅读(15141) 评论(0) 推荐(0) |

摘要:有几个API函数都可以实现这些功能,但是在大多数情况下ShellExecute是更多的被使用的,同时它并不是太复杂。 原型及参数含义 ShellExecute函数原型及参数含义如下: ShellExecute( hWnd: HWND; {指定父窗口句柄} Operation: PC... 阅读全文

posted @ 2011-09-10 17:20 清风轩 阅读(939) 评论(0) 推荐(0) |

博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3