易截截图软件、单文件、免安装、纯绿色、仅160KB

DELPHI 让窗体不在任务栏显示

需要用到的一个函数:
LONG SetWindowLong(
HWND hWnd,
int nIndex,
LONG dwNewLong
);
其中nIndex GWL_EXSTYLE     Retrieves the extended window styles.
dwNewLong   WS_EX_TOOLWINDOW     Creates a tool window; that is, a window intended to be used as a floating toolbar. A tool window has a title bar that is shorter than a normal title bar, and the window title is drawn using a smaller font. A tool window does not appear in the taskbar or in the dialog that appears when the user presses ALT+TAB. If a tool window has a system menu, its icon is not displayed on the title bar. However, you can display the system menu by right-clicking or by typing ALT+SPACE.
有关dwNewLong的更多预定义值的含义,请自行查阅CreateWindowEx的帮助信息
在窗体创建事件中加入:
SetWindowLong(Application.Handle,GWL_EXSTYLE,WS_EX_TOOLWINDOW);
如果要整个程序不在任务栏显示,可以在dpr工程文件中加入以上代码,例如:(需要引用Windows单元)
begin
Application.Initialize;
SetWindowLong(Application.Handle,GWL_EXSTYLE,WS_EX_TOOLWINDOW);
Application.CreateForm(TForm1, Form1);
Application.Run;
end.


相关文档:

Delphi 动态创建窗口的几种方法

  方法1:可写为函数,再调用
  Application.CreateForm(TForm1, Form1);
  Form1.ShowModal;
  Form1.Free;
  方法2:
  Form1:= TForm1.Create(Application);
  try
     Form1.ShowModal;
  finally
     ......

Delphi中使用@取函数地址的问题

例如以下代码:
unit Unit1;
interface
uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,Dialogs;
type
  TForm1 = class(TForm)
    procedure one();
    function two(x,y:integer):integer;
  private
    ......

SDL & Object Pascal (Delphi) [前言]

实际上这个名字叫[SDL & Delphi]也不成问题, 因为除了Delphi似乎也没有哪个流行的开发工具用的是Pascal语言。
SDL其实我也只学了不到两星期而已。刚开始我想试图用VC,因为这样资料最全,也很好找,但太久没用VC现在看C的代码有点困难(->这个算符是干吗的来着……)。其实作为一个专业不是计算机的人 ......

Delphi 自己写个Timer玩玩

技术交流,DH讲解.
明天去坐火车,回家,今天就没有事做,本来在弄一个跨进程获取其他程序里面组件,如ListView,ListBox,Button等的信息,突然有个想法自己写个Timer,不用SetTimer函数,我们自己用个多线程也正好实现这个.反正前段时间多线程也弄得比较多,本来想单独讲讲的,现在就用个例子来说明吧.
写成一个控件:utTimer.pas
v ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号