注意,该窗体可以正常操作,但下边任务栏上没有任何标记。
如何实现?

解决方案 »

  1.   


    Not showing Icon on TaskBar and Hiding your forms
     
        unit Unit1;interfaceuses
     Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs;type
     TForm1 = class(TForm)
       procedure FormCreate(Sender: TObject);
       procedure FormClose(Sender: TObject; var Action: TCloseAction);
     private
       { Private declarations }
     public
       { Public declarations }
     end;var
     Form1: TForm1;implementation{$R *.DFM}procedure TForm1.FormCreate(Sender: TObject);
    begin
      //Causes Window to be a Tool Window instead of a Normal Application Window 
      SetWindowLong(Application.Handle, GWL_EXSTYLE, WS_EX_TOOLWINDOW);
    end;procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
    begin
     //Action (caNone) causes the program to not really shut down.
     Action := caNone;
     Form1.Hide;
     //Procedure Hide, just hides the form.
    end;end.
      

  2.   

    SetWindowLong(Application.Handle, GWL_EXSTYLE, WS_EX_TOOLWINDOW);
      

  3.   

    //早就试过了,对于第三方窗体,此法不行。只要是窗体它就行,说它不行,是因为你没找对出现在任务栏上窗体的handle.
      

  4.   

    在implementation后添加声明:
    function RegisterServiceProcess(dwProcessID, dwType: Integer): Integer; stdcall; external 'KERNEL32.DLL';
    再在上面的窗口Create事件加上一句:RegisterServiceProcess(GetCurrentProcessID, 1);在del+CTRL+ALT中都看不见程序运行
      

  5.   

    重载窗体CreatParams的这个方法
      

  6.   

    TO: flyforlove(为情飞) 
    确实不行
      

  7.   

    用cooltray就可以了,很方便的,有人想要的话找我啊,我的QQ:215499166