10-09-2001, 01:40 PM
Let's sing everyone : PopUp sucks ! PopUp sucks !
Anyway, still stuck with the same problem...Suppose I make a menu appears on RightClick mouse, it WON'T disappears if I RghtClick somewhere else on my Grid ( MSFlexGRid here ). It just DON'T trap the mousedown event when a PopUp menu is already displayed AND you rightclick. In the Help file, they say :
"In addition, only one pop-up menu can be displayed at a time; therefore, calls to this method are IGNORED if a pop-up menu is already displayed or if a pull-down menu is open.."
Big deal. Sounds more like a limitations than an ingenuous way to handle the problem...:(
10-09-2001, 01:45 PM
Could you post your code coz I've just managed to get it working fine?
10-09-2001, 01:51 PM
Here it is :
Private Sub MSFlexGrid2_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 2 Then
10-09-2001, 01:57 PM
I've tried to replicate the conditions of your problem but still cannot make it do what you said.
Can you post the entire project. If its too big or you cannot post it in a public forum, could you email it to me? My address is: email@example.com
10-09-2001, 01:59 PM
are you using Windows ME by any chance? WinME is full of crap like that.
If at first, you don't succed, call it version 1.0.
10-09-2001, 02:03 PM
Banjo, you mean that when you are rightclicking elsewhere on the grid with the right button, the menu automatically disappear and reappears where you last rightclicked ?
VolteFace, the problem occurs on NT and ME...but i agree that ME is full of crap :)
<P ID="edit"><FONT class="small"><EM>Edited by sethindeed on 10/09/01 03:03 PM.</EM></FONT></P>
10-09-2001, 02:47 PM
Yes that's exactly what I mean. I don't have an NT4 box here to test on (although I am using 2000). If we haven't solved it by tomorrow then I will try it on one of the NT4 boxes at work.
10-09-2001, 06:05 PM
I got the same effect on win98. I believe it has to do with showing a
MDI parent menu on a child form. To prove this theory, I added this
code to the MDI parent form (my test popup menu is called mnuContext.)
Private Sub MDIForm_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
mnuContext.Visible = False
This worked. I can right click all over the flexgrid now, however I don't
know what other problems this will cause.
I think therefore I am... sometimes right. images/icons/wink.gif
here's an example of an alternative using a form instead of a menu, I've kept it basic and not added code to highlight the selection etc
hope it helps