473,320 Members | 1,993 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,320 software developers and data experts.

Iherrited Combobox that expands on right click not left

6
I'm working on an inherited combobox and want it to expand only when right clicked not left clicked. I have been trying...

private const int WM_CTLCOLORLISTBOX = 0x0134;

protected override void WndProc(ref Message m)
{
if (m.Msg == WM_CTLCOLORLISTBOX)
{
if (_RightMouseDown)
base.WndProc(ref m);
}
else
base.WndProc(ref m);
}

but this does not work and does not seem to be the direction to go on this. Any ideas?
Jul 20 '07 #1
2 1499
Plater
7,872 Expert 4TB
What about a Label(or a textbox I suppose) with a context menu? That's like the same thing. You right click it, select from the list of items and it gets placed into the label(or textbox)
Jul 20 '07 #2
Yonger
6
Thanks for the quick response!

This may work. Looking into it a bit now. The end goal is to have an object that acts like a button when left clicked .. but if right clicked will bring up a menu. When an item on the menu is chosen it will change the button left click behavior to the item chosen from the menu. Somthing along the lines of what's done in photo shop. Just a way to reduce the number of buttons. Only problem at this point with doing it with a context menu is I'm not sure how to show icons in a context menu. Back to Google..
Jul 20 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Kiteman - Canada | last post by:
I have a ComboBox (style 2) with 25 items in it. When I click on the arrow to see the items, I can only see the first 8. I have to scroll to see the others. Is there some way so set how many...
7
by: Nicolae Fieraru | last post by:
Hi All, I am trying to change the rowsource of a combobox when I click on it. I played with many events, associated with the form and the combobox, but still haven't figured out what is the way...
3
by: Wajih-ur-Rehman | last post by:
I am developing a C# app. I want to do something when someone double clicks on a combo box. But this event never fires. Any suggestions? Thanx!
0
by: Doug | last post by:
This is a repost of an item that I still cannot resolve. I have 3 combo boxes. The first leads to the second to the third. When I have selected a value in the second box, the third box shows...
4
by: genojoe | last post by:
I have the following code: .cboBox1.Items.AddRange(New Object() {"A", "B", "C"}) .cboBox2.Items.AddRange(New Object() {"A", "B", "C"}) .cboBox6.Items.AddRange(New Object() {"A", "B", "C"})...
2
by: VBTricks.de.vu Webmaster | last post by:
Hello, I'm still reimplementing the GUI of my app using the new toolstrips. My current problem is to autosize a combobox to the available with in the parent toolstrip. There are some buttons...
1
by: polocar | last post by:
Ciao a tutti, leggendo qua e là per il forum ho scoperto che non sono l'unico ad avere questo problema. Se si inserisce un controllo ComboBox in un form di C#, non è possibile impostare la sua...
4
by: senfo | last post by:
Hello All, For some reason, the MouseDoubleClick event for my ComboBox does not appear to be working. I am not subscribed to any other events for this control. I pulled out Spy++ and noticed...
8
by: =?Utf-8?B?RyBIdXN0aXM=?= | last post by:
This is the 2nd time posting so sorry for duplications. I am using VB.NT 2005 & a standard Combobox. I've been wracking my brain over this problem for a over a month & cannot seem to find a way to...
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
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
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...
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
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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.