473,395 Members | 1,815 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

REPOST : Context Menu


I have several context menus added to my form. The form is displaying items
in listviews connected to the context menus. When I click on an item in a
list view, a popup context menu shows allowing me to chese between editing
or deleting the item from the list view. That works fine.

However, in addition to calling the context menu on Click, I can call it
also by RightClick which causes application to either freeze, crash, call
Delete context menu two times, etc.

How can I solve this problem? Or how to limit pop up context menu to show
only when left clicked on an item.

Some people are recommending me to do MouseDown instead of Click but
MouseDown is not supported event for menu items of which my popup context
menu consists.

Any help will be appreciated,
Dino

--
-------------------------------------------------------------------------
FIGHT BACK AGAINST SPAM!
Download Spam Inspector, the Award Winning Anti-Spam Filter
http://mail.giantcompany.com

Nov 20 '05 #1
2 1616
"Dino M. Buljubasic" <dino.buljubasic([no spam])@rivusglobal.com>
schrieb

I have several context menus added to my form. The form is
displaying items in listviews connected to the context menus. When I
click on an item in a list view, a popup context menu shows allowing
me to chese between editing or deleting the item from the list view.
That works fine.

However, in addition to calling the context menu on Click, I can call
it also by RightClick which causes application to either freeze,
crash, call Delete context menu two times, etc.

How can I solve this problem? Or how to limit pop up context menu to
show only when left clicked on an item.

Some people are recommending me to do MouseDown instead of Click
but MouseDown is not supported event for menu items of which my popup
context menu consists.


Usually the contextmenu is only shown when the right mouse button is
released. Did you try it?
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #2
Thanks Armin,

I fixed this one. The problem was that I was calling explicitly the context
menu on ListView.Click event. That is why I was getting it both ways, by
left and right clicking on my list view.

Regards,
Dino

--
-------------------------------------------------------------------------
FIGHT BACK AGAINST SPAM!
Download Spam Inspector, the Award Winning Anti-Spam Filter
http://mail.giantcompany.com
"Armin Zingler" <az*******@freenet.de> wrote in message
news:eh**************@TK2MSFTNGP10.phx.gbl...
"Dino M. Buljubasic" <dino.buljubasic([no spam])@rivusglobal.com>
schrieb

I have several context menus added to my form. The form is
displaying items in listviews connected to the context menus. When I
click on an item in a list view, a popup context menu shows allowing
me to chese between editing or deleting the item from the list view.
That works fine.

However, in addition to calling the context menu on Click, I can call
it also by RightClick which causes application to either freeze,
crash, call Delete context menu two times, etc.

How can I solve this problem? Or how to limit pop up context menu to
show only when left clicked on an item.

Some people are recommending me to do MouseDown instead of Click
but MouseDown is not supported event for menu items of which my popup
context menu consists.


Usually the contextmenu is only shown when the right mouse button is
released. Did you try it?
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Mohit Gupta | last post by:
Hi all, Lately I have been working on an application in VB .net CF for Pocket PC device. I have a small question about Context Menu. When I try to close the window after context menu is poped...
5
by: Dean L. Howen | last post by:
Dear friends, Could we determine when context menu should appear?
8
by: Dennis C. Drumm | last post by:
Is there a way to modify the standard context menu shown when someone right clicks in a windows text box and that would work for all open windows applications? The standard context menu for...
0
by: VP | last post by:
G'day folks, well i am attempting to get an understanding on how to create the menuitems in a context menu on the fly. So far I have managed to actually achieve the menu items being created for...
2
by: Neo | last post by:
Sorry for reposting, subject line was incorrect... These are not working in Visual Studio .NET 2005 beta 1 (no such methods) mainMenu1.MergeMenu(contextMenu1); and
18
by: Colin McGuire | last post by:
Hi - this was posted last weekend and unfortunately not resolved. The solutions that were posted almost worked but after another 5 days of working on the code everynight, I am not further ahead....
5
by: lgbjr | last post by:
Hello All, I have several Pictureboxes (linked to an AccessDB) on a VB.NET form. I would like to use a context menu to allow the user to open the picture in their default picture viewer or...
1
by: goRide | last post by:
Hi, I'm looking of a way (preferred - a ready class or dll) to customize the context menu. many application has more controls inside the context menu (like textbox, sliders, checkbox, panel...
2
by: MCM | last post by:
I'm working on a plotting control. The plotting control will have a context menu with basic commands for "scaling", "zooming", etc. Is there a way that, from the parent form, I can add more...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.