说说嘛!简单的说就是两个窗口,一个显示时不出现任务条,另一个则相反!有的对话框
就是这样!
列如NETANTS!在显示‘参数设置’窗口是不出现任务条,显示主窗口时就出现
怎样做的呢!
就是这样!
列如NETANTS!在显示‘参数设置’窗口是不出现任务条,显示主窗口时就出现
怎样做的呢!
解决方案 »
- 远程com对象调用的困惑
- DrawText函数使用DT_CALCRECT参数后返回的Rect代表什么?
- dbchart 使用问题?(高手请进)
- 如何捕获控件的消息?(在线等,解决马上给分)
- 一个有关directshow的问题,类TFilter,TFilterGraph,TVideoWindow上那儿去找,在线等待... ...
- 关于数组定义后对系统性能的影响疑问?
- 调用报表窗口
- 关于打印机初始化的问题
- Install Shield 7.0那儿有下载啊
- Delphi编程中,选择拷贝浏览器中的一片文字,我希望粘贴的时候得到的它的html源代码. 如何实现?
- 一個串口編程問題﹕如何判斷一個信號在一秒鐘時間內連續接受了五次﹖
- 如何安装控件TDosMove?加急!!!!!谢谢各个大哥!!!!!
Const WM_ICONCALLBACKMESSAGE=WM_USER+0;
tind:TNotifyIconData;
procedure WndProc (var Message:TMessage);message WM_iconcallbackMessage; //上面都是定义//压缩到任务栏
tind.cbSize:=SizeOf (TNotifyIconData);
tind.Wnd:=form1.Handle;
tind.hIcon:=Application.Icon.Handle;
tind.uFlags:=NIF_TIP OR NIF_ICON OR NIF_MESSAGE;
tind.uID:=0;
tind.szTip:='测试';
tind.uCallBackMessage:=WM_ICONCALLBACKMESSAGE;
shell_NotifyIcon (NIM_ADD,@tind);
shell_NotifyIcon (NIM_delete,@tind);
//截获点击消息的函数
procedure WndProc (var Message:TMessage);if msg.LParam=WM_LButtonDown then
begin
ShowWindow(Application.Handle,SW_Show);
Application.Restore;
end
else if msg.LParam=WM_RButtonDown then
begin
GetCursorPos(p);
PopupMenu1.Popup(p.x,p.y);
end;
Const WM_ICONCALLBACKMESSAGE=WM_USER+0;
tind:TNotifyIconData;
procedure WndProc (var Message:TMessage);message WM_iconcallbackMessage; //上面都是定义//压缩到任务栏
tind.cbSize:=SizeOf (TNotifyIconData);
tind.Wnd:=form1.Handle;
tind.hIcon:=Application.Icon.Handle;
tind.uFlags:=NIF_TIP OR NIF_ICON OR NIF_MESSAGE;
tind.uID:=0;
tind.szTip:='测试';
tind.uCallBackMessage:=WM_ICONCALLBACKMESSAGE;
shell_NotifyIcon (NIM_ADD,@tind);
shell_NotifyIcon (NIM_delete,@tind);
//截获点击消息的函数
procedure WndProc (var Message:TMessage);if msg.LParam=WM_LButtonDown then
begin
ShowWindow(Application.Handle,SW_Show);
Application.Restore;
end
else if msg.LParam=WM_RButtonDown then
begin
GetCursorPos(p);
PopupMenu1.Popup(p.x,p.y);
end;
再在退出此窗体的处理中添加代码显示任务栏,最小化事件等其他一些处理里面也加同样的处理过程就可以了。
看看我的这段程序
unit Unit1;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, jpeg;type
TSplash = class(TForm)
Timer1: TTimer;
Image1: TImage;
procedure Timer1Timer(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Splash: TSplash;implementation{$R *.dfm}procedure TSplash.Timer1Timer(Sender: TObject);
begin
timer1.enabled:=false;
end;procedure TSplash.FormCreate(Sender: TObject);
begin
SetWindowLong(Handle, GWL_STYLE,
GetWindowLong(Handle,GWL_STYLE) AND
NOT WS_CAPTION);
ClientHeight := Height;
Refresh;end;end.unit Unit2;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;type
Tmainform = class(TForm)
private
{ Private declarations }
public
{ Public declarations }
end;var
mainform: Tmainform;implementation{$R *.dfm}end.program Project1;uses
Forms,
Unit1 in 'Unit1.pas' {Splash},
Unit2 in 'Unit2.pas' {mainform};{$R *.res}begin
Application.Initialize;
Splash:=TSplash.Create(application);
Splash.Show;
Splash.Refresh;
while splash.timer1.enabled do
application.ProcessMessages;
Application.CreateForm(Tmainform, mainform);
splash.hide;
splash.free; Application.Run;
end.
你直接运行就可以了,我刚刚调试过的,只是图片你要改一下,那时我本机上的