this is what i have before i asked the question
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;
type
TForm1 = class(TForm)
private
{ Private declarations }
protected
procedure CreateParams(var Params: TCreateParams); override;
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.CreateParams(var Params: TCreateParams);
begin
inherited CreateParams(Params);
if Assigned(Application.MainForm) then
begin
Params.WndParent := GetDesktopWindow;
Params.Style := WS_CHILD;
end;
end;
---------------------------
{this makes so the program disappear on taskbarmthe way i wanted

}
procedure TForm1.FormShow(Sender: TObject);
begin
ShowWindow(Application.Handle,SW_HIDE);
SetWindowLong(Application.Handle, GWL_EXSTYLE, GetWindowLong(Application.Handle, GWL_EXSTYLE) or WS_EX_TOOLWINDOW and not WS_EX_APPWINDOW);
end;
-------------------------------------------------------
and it works fine, but minimize if press on 'show desktop'-button on taskbar.
i have tried to make a new project with the code you suggested and i put it where it should be, and the result is the program just hanged when i try to run it from delphi

,
so i tried to take a small pieces of it and implent it to program, but it still minimize when i push the btn :/,