急~~~~~服务程序不能弹出右键菜单,不能对Edit控件输入内容,什么原因?(100)

  • 主题发起人 kuer6983
  • 开始时间
K

kuer6983

Unregistered / Unconfirmed
GUEST, unregistred user!
1)服务程序不能弹出右键菜单,代码如下:procedure TForm1.Grid1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);var P: TPoint; iCol, iRow: integer;begin if Button = mbLeft then begin Grid1.MouseToCell(X, Y, iCol, iRow); if (iCol = 2) then begin P.X := X; P.Y := Y; P := Grid1.ClientToScreen(P); case iRow of 12..13: popupMenu1.Popup(P.X, P.Y); end; end; end;end; 调试已运行到popupMenu1.Popup(P.X, P.Y);但就是不能弹出菜单;将之改为应用程序,没有改用任何地方,确是可以弹出....是我的代码哪里有问题吗?2)另外,不能对Edit控件输入内容...找了很多资料,不过很少有提到这个问题的,还请哪位使用过的大虾帮忙看一下,问题出在哪里?谢~
 
if Button = mbLeft then...是左键不能弹出菜单吗?
 
顶部