473,326 Members | 2,102 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,326 software developers and data experts.

TabControl - Right Mouse Click event

I'd like to be able to capture a Right Mouse Click event on aparticular Tab and popup a context menu to allow the user toclose the tab without the tab having to be the current selectedtab. Does anyone know if this possible? I have yet to find away to accomplish this somewhat simple task.

Thanks,

--------------------------------
From: Nathan Williams

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>hHkt2fAM60a8IzMVTg7mtA==</Id>
Nov 20 '05 #1
1 2316
I posted code for this not so long ago.
It now lives on my site under the heading.
Associate a ContextMenu with the TabItem headers of a Tabcontrol.
http://homepage.ntlworld.com/mdaudi1...bcontrols.html

--
Mick Doherty
http://homepage.ntlworld.com/mdaudi1...nate/home.html
"Nathan Williams via .NET 247" <an*******@dotnet247.com> wrote in message
news:Og**************@TK2MSFTNGP09.phx.gbl...
I'd like to be able to capture a Right Mouse Click event on a particular Tab
and popup a context menu to allow the user to close the tab without the tab
having to be the current selected tab. Does anyone know if this possible?
I have yet to find a way to accomplish this somewhat simple task.
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.701 / Virus Database: 458 - Release Date: 07/06/2004
Nov 20 '05 #2

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

Similar topics

3
by: mitsura | last post by:
Hi, I have included a small listing. The test program opens a panel and show a bitmap. What I want is to when the mouse is over the bitmap panel, I want to trap the left mouse click. The...
2
by: Andreas Fredriksson | last post by:
Hello I am using a TabControl wich includes a ListView on each TabPage. On the click event I use the text on each tab to fill the ListView with data. When the user click on a TabPage a use the...
2
by: Francois Vanderseypen | last post by:
Can someone tell me why you cannot drag something onto a tabcontrol with zero tabpages? I have a kind of 'docking' interface and relies heavily on GDI+, a screenshot is available here: ...
0
by: Gianluca | last post by:
Hi All, i'm experencing a frustrating and strange behaviaour : I created a Windows project in VB.NET 2003 with a form and then I added a TabControl on the form, and added 5 TabPages on...
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...
7
by: Steve | last post by:
How do you disable the mouse right click to prevent pop-up window? Or if I want to have cut/copy/paste on pop-up window use same code as my custom cut/copy/paste that are triggered by toolstrip...
8
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I disable the right mouse button? -----------------------------------------------------------------------...
18
by: Shocky | last post by:
Hi there, I am trying to detect whether my IE6 users have pressed both right and left mouse buttons simultaneously in my Javascript code, by using: if(event.button==3) {alert("Both right and...
1
by: \(O\)enone | last post by:
I've added a TabControl to my WinForms app, and added a couple of tabs to the control. The result is that the top strip of the TabControl contains the two tabs, and then to the right of them is...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.