desktop windows

Hi,

I've got the following method in a few of the forms of my app:

procedure TSubForm1.CreateParams(var Params: TCreateParams);
begin
  inherited CreateParams(Params);
  Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW;
end;

Which makes each form a desktop window, but I have a couple of problems
(where myapp behaves differently to other apps which allow you to have
desktop windows) to do with the window that pops up when the user
presses alt-tab (does it have an name? the alt-tab window?).

1)When the window displays my application forms, it displays the icon of
the application, not of the form.

2)If I have the following list of windows in the alt-tab window:

Notepad, MyAppForm1, MyAppForm2, MyAppForm3, MyAppForm4

and I select MyAppForm1

instead of getting:

MyAppForm1, Notepad, MyAppForm2, MyAppForm3, MyAppForm4

I get:

MyAppForm1, MyAppForm2, MyAppForm3, MyAppForm4, Notepad

next time I press alt-tab.

Any idea how to solve these? (I'm using delphi2 and win95)

Thanks

Sent via Deja.com http://www.deja.com/
Before you buy.