473,671 Members | 2,193 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

context menus with icons

Hi, is there any way to add menu items to a context menu with icons next to
them. When I declare a menuitem, it does not seem like there is a .icon
property or anything similar or intuitive like that. An example that
illustrates this is right clicking on your desktop, choosing "New", and for
each type of file it displays a different icon next to it. Thanks for your
help!
Nov 21 '05 #1
1 1054
On Tue, 19 Oct 2004 11:11:28 -0400, "Matt Michael"
<ih***@spamform e.com> wrote:
Hi, is there any way to add menu items to a context menu with icons next to
them. When I declare a menuitem, it does not seem like there is a .icon
property or anything similar or intuitive like that. An example that
illustrates this is right clicking on your desktop, choosing "New", and for
each type of file it displays a different icon next to it. Thanks for your
help!


You would have to inherit from the MenuItem class and add an image
property, then Override the OnPaint method to draw the icon where you
want it.

Hope this helps

Blu.
Nov 21 '05 #2

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

Similar topics

1
1541
by: Doug Bell | last post by:
Hi, If I modify my Registry adding a new key HKEY_CLASSES_ROOT\*\shell\Use My App\command with a (Default) Value of C:\Program Files\Doug\DotNetApps\MyApp.exe "%1" then right clicking on files in the Explorer Windows opens the context menu with the option "Use My App" and selecting this runs My App with the selected file name. Just as I wanted. The problem I now have is that double clicking a Visual Studio file (.sln) also starts My...
6
2043
by: Richard Walters | last post by:
Guys, Is there a way to change the icons for customised menus within access. The icons within Access itself are pretty plain and boring and I would like to spruce my application up a little with some nice icons I have. Any help greatfully appreciated. Richard Walters
4
1706
by: ssg31415926 | last post by:
I've got a ListView which can show many different types of object. I need to display a ContextMenu whose MenuItems depend on the object type. I was planning to pre-create the ContextMenus when the app is started and then assign them when the object is clicked on. The first few items in the menus will all be the same (Large Icons, Small Icons, etc.). I create all of those objects, then add them to the first context menu and all is...
6
8503
by: Bob | last post by:
I'd like to be able to do three things with the context menu 1. change the width 2. change the borderstyle to none 3. change the back color I don't think it's possible, so what's the best way to make my own menu-like control? TIA,
6
1145
by: Juan Romero | last post by:
Hey guys, Is it possible in VB.NET to do owner drawn menus? I want to spice up my menus a bit with graphics and colors. Can this be done? If so, please point out some tutorials on this matter. Thank you in advance.
0
1024
by: Robert Smith | last post by:
Hello, I have written some context menus in my application, however I see lots of nice icons on the menus that microsoft use. It is not obvious how one would add these icons to the menu items. Ideas ideas how you would do this. Thanx in advance Robert
4
1119
by: sonu | last post by:
Hi, Is it possible to attach the icons to the menus in VB.NET. I have read we have to use ownerdraw menus to do this. Does anyone know more than this. Sample application would be a better help. Thanks in advance.
9
2891
by: Siv | last post by:
Hi, I have just searched MSDN and Google and can't find a tutorial about how to add icons to menus in a VB.NET or C#.NET Windows Forms application. Does anyone know how it's done or can point me at a tutorial that is easy to follow. In anticipation, thanks. Graham Sivill Martley, Near Worcetser UK.
10
3114
by: Adam Honek | last post by:
Hi all, Controls such as the tree view or list view use image lists hence I can set the quality of icons to 32bit. This way they look their best. Unfortunately both the menu and tool bar strip control don't use image lists. How can I still achieve 32bit icon quality (icons are natively 32bit) in these controls? I don't see any such property in either of them.
0
8472
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8909
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8819
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8596
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8667
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5690
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4399
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2806
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 we have to send another system
2
1801
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.