关于判断菜单是否弹出的问题?? 如题, 上网搜了一下, 都说用AnyPopup,自己试了一下, 不知道为什么, 不管有没有打开菜单, AnyPopup都返回True。请问有没有什么切实有效的解决办法? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 试试在PopupMenu的OnPopup事件里面判断 to liangqingzhi 我这个主要是针对MainMenu, 如果连PopupMenu也能一起实现最好不过。而且我用的MainMenu里面没有OnPopup 看看这样行不行:private procedure WMInitMenuPopup(var Msg:TMessage);message WM_INITMENUPOPUP; procedure WMUnInitMenuPopup(var Msg:TMessage);message WM_UNINITMENUPOPUP;procedure TForm1.WMInitMenuPopup(var Msg: TMessage);begin inherited; Caption:='Y';end;procedure TForm1.WMUnInitMenuPopup(var Msg: TMessage);begin inherited; Caption:='N';end; //liangqingzhi的方法不错,完善一下如下 private FPopupCount: Integer; procedure WMInitMenuPopup(var Msg: TWMInitMenuPopup); message WM_INITMENUPOPUP; procedure WMUnInitMenuPopup(var Msg: TWMInitMenuPopup); message WM_UNINITMENUPOPUP;//....procedure TForm1.WMInitMenuPopup(var Msg: TWMInitMenuPopup);begin inherited; Inc(FPopupCount); Caption := 'Y';end;procedure TForm1.WMUnInitMenuPopup(var Msg: TWMInitMenuPopup);begin inherited; Dec(FPopupCount); if FPopupCount <= 0 then Caption := 'N';end; WebBrowser中url 连接问题 模块中使用了Combobox1和Edit1两个控件 大家帮我看看啊,我下载了一个Easysoft的Interbase ODBC驱动,不过它不支持中文,好不容易搞出来的,怎么办... 如何知道他是个Delphi 高手? fastreport学习 小弟有一个做向导的程序,可是有点问题,请大家帮忙. 附:源程序 在多文档程序中如何不让我的窗口多次创建 如何监听/拦截一个网络数据包?急,在线! 如何显示不完整字段的完整信息?求教。 gird下拉 请问我这样的代码为啥不能循环到头 为何Double类型的数组经赋值后小数位被自动截取
我这个主要是针对MainMenu, 如果连PopupMenu也能一起实现最好不过。
而且我用的MainMenu里面没有OnPopup
private
procedure WMInitMenuPopup(var Msg:TMessage);message WM_INITMENUPOPUP;
procedure WMUnInitMenuPopup(var Msg:TMessage);message WM_UNINITMENUPOPUP;procedure TForm1.WMInitMenuPopup(var Msg: TMessage);
begin
inherited;
Caption:='Y';
end;procedure TForm1.WMUnInitMenuPopup(var Msg: TMessage);
begin
inherited;
Caption:='N';
end;
FPopupCount: Integer;
procedure WMInitMenuPopup(var Msg: TWMInitMenuPopup); message WM_INITMENUPOPUP;
procedure WMUnInitMenuPopup(var Msg: TWMInitMenuPopup); message WM_UNINITMENUPOPUP;//....
procedure TForm1.WMInitMenuPopup(var Msg: TWMInitMenuPopup);
begin
inherited;
Inc(FPopupCount);
Caption := 'Y';
end;procedure TForm1.WMUnInitMenuPopup(var Msg: TWMInitMenuPopup);
begin
inherited;
Dec(FPopupCount);
if FPopupCount <= 0 then Caption := 'N';
end;