说说嘛!简单的说就是两个窗口,一个显示时不出现任务条,另一个则相反!有的对话框
就是这样!
  列如NETANTS!在显示‘参数设置’窗口是不出现任务条,显示主窗口时就出现
怎样做的呢!

解决方案 »

  1.   

    看个例子
     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;
      

  2.   

    看个例子
     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;
      

  3.   

    我说的是其中的一个窗口在SHOW后不出现任务条的问题!
      

  4.   

    这个容易。在你想要它占用整个屏幕的窗口onshow事件中隐藏任务栏,会吧?
    再在退出此窗体的处理中添加代码显示任务栏,最小化事件等其他一些处理里面也加同样的处理过程就可以了。
      

  5.   

    作个splash窗体
    看看我的这段程序
    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.
    你直接运行就可以了,我刚刚调试过的,只是图片你要改一下,那时我本机上的