SetWindowLong(Application.Handle, GWL_EXSTYLE, WS_EX_TOOLWINDOW);procedure Tdispatcha.OnIconNotify(var Message: TMessage); var AC: LongInt; CP: TPoint; begin AC := Message.LParam; if AC = WM_RBUTTONDOWN then begin if dispatcha.Visible then exit; GetCursorPos(CP); PopMenudis.Popup(CP.X, CP.Y); end; end; procedure Tdispatcha.FormPaint(Sender: TObject); begin hide; end;
如果是想用到控件 RX包内就有此功能的控件
用什么Api函数呢?Thank you。
email:[email protected]
thank you!
var
AC: LongInt;
CP: TPoint;
begin
AC := Message.LParam;
if AC = WM_RBUTTONDOWN then
begin
if dispatcha.Visible then
exit;
GetCursorPos(CP);
PopMenudis.Popup(CP.X, CP.Y);
end;
end;
procedure Tdispatcha.FormPaint(Sender: TObject);
begin
hide;
end;