在很多程序中,都可以看到程序运行中,会有一个Dos窗口,实时显示一些运行信息,这里就告诉大家是如何实现的,我们做个简单的,其实对控制台的操作还有很多,有兴趣的可以去查资料。用到的API函数如下: //创建控制台 AllocConsole; //获取控制台窗口 GetStdHandle; //... Read More
posted @ 2015-08-21 17:31 findumars Views(2824) Comments(0) Diggs(0)
unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, Menus, StdCtrls, Buttons, E... Read More
posted @ 2015-08-21 17:26 findumars Views(4890) Comments(1) Diggs(0)
例如对windows发消息让文本选中。 SendMessage(Text1.hwnd,EM_GETSEL,0,-1 );EC_LEFTMARGIN(&H1) EC_USEFONTINF //设置左边距时使用EC_RIGHTMARGIN EC_USEFONTINF //设置右边距时使用EC_USEFO... Read More
posted @ 2015-08-21 17:24 findumars Views(7596) Comments(0) Diggs(0)
Delphi编程获取系统当前进程、窗口句柄、文件属性以及程序运行状态.uses TLHelp32,PsAPI;(1)显示进程列表:procedure TForm1.Button2Click(Sender: TObject);var lppe: TProcessEntry32;found : bool... Read More
posted @ 2015-08-21 17:19 findumars Views(3633) Comments(0) Diggs(0)
在看 API 文档时, 我们经常见到 GetLastError; 它可以返回操作后系统给的提示.但 GetLastError 返回的只是一个信息代码, 如何返回对应的具体信息呢?FormatMessage 可以, 但这个函数太复杂了; 可以用 SysErrorMessage 代替它.举例:var e... Read More
posted @ 2015-08-21 17:18 findumars Views(509) Comments(0) Diggs(0)