我的要求是:1、不是最小化时,而是程序在运行时 2、最好用api解决

解决方案 »

  1.   

    ????
    你直接将form去掉或者hide不就行了?
      

  2.   

    工程里
    在application.run;前加
    application.showmainform :=false;
      

  3.   

    //uses shellapi;
    procedure TForm1.FormCreate(Sender: TObject);
    begin
    //如果我没有猜错的话,你是想让窗体(form)在屏幕上显示而在任务栏不显示,下面代码可以实现
    setwindowlong(application.handle,GWL_EXSTYLE,getwindowlong(application.Handle,GWL_EXSTYLE) or WS_EX_TOOLWINDOW);
    end;
      

  4.   

    在DPR中(你可更改Form的Name,这里假设为TPasskiller)
    var
      ES:integer;
    begin
      Application.Initialize;
      ES:=GetWindowLong(Application.Handle,GWL_EXSTYLE);
      ES:=ES or WS_EX_TOOLWINDOW and not WS_EX_APPWINDOW;
      SetWindowLong(Application.Handle,GWL_EXSTYLE,ES);
      Application.CreateForm(TPassKiller, PassKiller);
      Application.Run;
    end.完全符合你的要求!
      

  5.   

    procedure TForm1.FormCreate(Sender: TObject);
    begin
     setwindowlong(application.handle,-20,getwindowlong
     (application.Handle,-20) or $80);//只要這句就行了end;