-
This is a lengthy message but is worth looking at...
I have been trying to figure out the problem of doing a popup menu on a modal form the past few days. There are some strange behaviour that occurs to my program which I think progrmammers might be interested to know. I try calling the form (I am going to use the name frmModal) from certain places (or Events). I discovered I cannot do a popup menu on frmModal if its show method is being excuted in a "popup menu" click event (it works fine when the show method is being excuted in a "regular menu" - those on the menu bar, click event or some other control's click event). This means the popup menu that I used to call the frmModal might be still in session or something and therefore stop the popup menu on frmModal from showing up.
I have been trying to look for a solution to this, I am not sure if there are any method or API calls I can use to get around this problem. any suggestions?
-
Have you tried:
Code:
Private Sub ShowForm(ByVal frm as Form)
frm.Show Modal
End Sub
and then calling it from the popupmenu?
I don't know if this will work. Just guessing
-
What error are you getting? Invalid procedure call? I can't seem to generate the same problem. I am using the show method with argument vbModal, in a menu click event that is displayed with the PopupMenu statement.
Do I understand your problem correctly?
-
Hi benski,
I have no problem bring out the form using a popup menu. What's troubling me is after the modal form is on displayed on the screen, I cannot do up a popup menu on it (the modal form). I have already stepped through code, the popupmenu command does excute, just no popup menu shows up on screen
I have tried r0ach's suggestion but I am still getting the same result, thanks for halping though
Edited by Sparhawk on 02-23-2000 at 11:19 AM
-
I do not know if this is possible, but try to set the window to non-modal, then call popupmenu, and then set the window to modal again. :(
I don't know if it's possible to change between modal and non-modal in the windows