473,467 Members | 1,477 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Center Aligning the right mouse click menu

Hi

I would like to center align the menu that gets displayed when right mouse
is clicked. In MFC, the function TrackPopupMenu takes a parameter that
determines the alignment of the menu (left, right or centered). How do I do
that in C#?

Regards
Sundar

Nov 15 '05 #1
1 2412
Sundar,

It appears that you will have to handle the displaying of the menu
yourself. To do this, you will probably have to handle the right click
event for the control (or whenever you want the context menu to pop up).
Once you have that, you will have to call the TrackPopupMenu method yourself
through the P/Invoke layer.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- ni**************@exisconsulting.com

"Sundar" <su****@sundar.com> wrote in message
news:wz*************@news.level3.com...
Hi

I would like to center align the menu that gets displayed when right mouse
is clicked. In MFC, the function TrackPopupMenu takes a parameter that
determines the alignment of the menu (left, right or centered). How do I do that in C#?

Regards
Sundar

Nov 15 '05 #2

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

Similar topics

5
by: MisterG | last post by:
Using the following code I am able to open a new window when a user right clicks an object in my document. if (window.event.button == 2) { Win1 = window.open("","","height=200,width=200");...
3
by: Anand Ganesh | last post by:
Hi All, When the user right clicks on the desktop or selects a file and right clicks the mouse he should see our own submenu along with the Windows context menu. How will I do this in Visual C#...
2
by: Sean | last post by:
Hi, I have a treeview and user can right click the treenodes, depending on the nodes, different shortcut menu will appear. I want only the shortcut menu to appear if the point of the right...
6
by: Dan Bass | last post by:
If you look at explorer, right clicking on a file, first selects the file, then throws up the context menu relating to that selection. With a Windows ListBox control and a simple context menu,...
3
by: vijaynats | last post by:
I have a treeview with a ContextMenu attached. When i click on a node, AfterSelect fires but does not fire when right clicked (the context menu pops up). (Background: I have loaded a list of...
5
by: mabond | last post by:
Hi My project has a form, two list boxes (lstArchive and lstSchedule) and two buttons (btnSendArchive and btnSendSchedule) Each list box represents the content of a directory. The command...
4
by: Pucca | last post by:
How can I tell a mouse right clicks over a listview item that's in a container panel. I only want to display a popup menu if the user right click the mouse over an item on the Listview. I don't...
8
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I disable the right mouse button? -----------------------------------------------------------------------...
4
by: Przemek M. Zawada | last post by:
Dear Group, I have written a software (C#/VS2005), which enter current directory, match all requested files and rename it recursively (removing special chars, etc). What I want is to add in...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.