好像是这样:
Procedure TF_Main.WMTrayMessage(Var Msg:TMessage);
 Var
   PMouse:TPoint;
 Begin
  If Msg.LParam=WM_LButtonDBLCLK Then
    Begin
      F_Main.show;
      Application.Restore;
    End
   Else If Msg.LParam=WM_RButtonDown Then
     Begin
       GetCursorPos(PMouse);
       PopupMenu1.Popup(PMouse.X,PMouse.Y); 
     end;
 End;