Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Main Menu Item

Main Menu Item

Scheduled Pinned Locked Moved Visual Basic
csharp
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mtone
    wrote on last edited by
    #1

    In VB.net could someone tell me how, if it is possible,to add icons next to a Menu item.

    N 1 Reply Last reply
    0
    • M mtone

      In VB.net could someone tell me how, if it is possible,to add icons next to a Menu item.

      N Offline
      N Offline
      Name Removed
      wrote on last edited by
      #2

      The MenuItem Class does not automatically support icons :(. You have to set .OwnerDraw() property to true, and handle the MeasureItem (setting the size of the item) and DrawItem (drawing the item) events. Instead of doing that for every MenuItem on your form, you can make a class inheriting from MenuItem, that automatically sets OwnerDraw to true, and draws the item with it's icon. Here is an example someone has posted to this site. Working with OwnerDraw Menus in VB.NET

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups