|
-
Apr 9th, 2003, 12:54 PM
#1
Thread Starter
Frenzied Member
Another Strange TreeView Behavior
Ok, see if you can stay with me.
I have 2 forms. Each form has a TreeView control on them.
On right click of the TreeView on the first Form, I popup a menu.
When I click the menu, the second form is shown modal to the first form. When I do this, I cannot get the menu to popup on the second form when I right click the TreeView there.
However, if I don't right click the first form but insted use the menu from the top of the form to show the second form, I can then right click and get the popup menu on the second form.
-
Apr 9th, 2003, 01:19 PM
#2
The reason for this is that you can only show one pop-up menu at the time. Even if the first menu closes the Click event is still executing since you show the form modally. A work-around would be to add a Timer to your first form, set the Enabled property to False and the Interval to 10 (or something). Add the following code in the timer event:
VB Code:
Timer1.Enabled = False
Form2.Show vbModal 'or whatever you call your second form
Now simply enable the Timer in the click event of the menu.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|