Hi All,

I am trying to port some Delphi 5 or 7 (cannot recall which) to Lazarus.

What do I change WM_USER to? I am getting Identifier not found.

Here is the code:

main.pas

const
  WM_USER_APPLICATION_MINIMIZE = WM_USER+1;

// identifier not found WM_USER

type
[...]
  private
    { Private declarations }
     procedure OnUserAppMin(var M: TMessage);
       message WM_USER_APPLICATION_MINIMIZE;

procedure TForm1.OnUserAppMin(var M: TMessage);
begin
  Application.Minimize;
end; { OnUserAppMin }
{----------------------------------------------------------}

about.pas

procedure TForm2.FormKeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
  if (key = VK_ESCAPE) then
  begin
    key := 0;
    PostMessage(Form1.Handle, WM_USER_APPLICATION_MINIMIZE, 0, 0);

// error : Identifier not found WM_USER_APPLICATION_MINIMIZE

    close;
  end;
end; { FormKeyDown }
{----------------------------------------------------------}

                                          
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to