Restoring Minimized Form Programatically

In D1, I am using the following code to check for a previous instance,
and try to
restore it, rather than running again.  It works fine, BUT IF THE FORM
IS
MINIMIZED AS AN ICON at the time, then the form is restored,
BUT THE ICON REMAINS.

The form becomes active, but will then refuse to minimize again,
until  you "restore" from the icon's system menu,
(or from the taskbar in Win95).  Then the icon disappears and
any future attempts to minimize will now work normally.

Symptoms are the same whether I use the ShowWindow function or
send the WM_SYSCOMMAND message with the SW_RESTORE, or
SW_SHOWNORMAL directive.

Do I need some additional call to properly inform the system to
remove the icon?

=============================================================
The full code is shown below... NOTE:  the form is created with:
border style bsSingle
border icons biSystemMenu, biminimize  ONLY

The forms OnCreate event points to the FormCreate method.

Compile the program in D1, then run from File Manager,
Minimize the form, and run again.
================================================================
(* TestMin.Dpr *)
program Testmin;

uses
  Forms, Wintypes, WinProcs,
  Tesminun in 'TESMINUN.PAS' {Form1};

{$R *.RES}

begin
  {register a personal message for this app only, and send it out
   if a previous instance exists}
  MessageID := RegisterWindowMessage('CHECK TESTMIN Previous Inst' ) ;
  if hPrevInst <> 0 then
     PostMessage(hwnd_Broadcast, MessageID, 0, 0 )
  else
  begin
       Application.CreateForm(TForm1, Form1);
  Application.Run;
  end ;
end.

(* tesminun.pas *)
unit Tesminun;

interface

uses
  SysUtils, WinTypes, WinProcs, WinCrt, Messages, Classes, Graphics,
Controls,
  Forms, Dialogs;

type
  TForm1 = class(TForm)
    procedure FormCreate(Sender: TObject);
    Procedure OnAppMessage(var Msg : Tmsg ; var Handled : boolean ) ;
  end;

var
  Form1: TForm1;
  MessageID : Word ;

implementation

{$R *.DFM}
 Procedure TForm1.OnAppMessage(var Msg : Tmsg ; var Handled : boolean )
;
 begin

      if Msg.Message = MessageID then
        Begin
              if Self.Enabled and Self.Visible then
                 begin
                      ShowWindow(Self.Handle, SW_RESTORE) ;
                      BringToFront ; (* and Sets Focus ;*)

                 end

        end ;
 end ;

procedure TForm1.FormCreate(Sender: TObject);
begin
          Application.OnMessage := OnAppMessage ;

end;

end.