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. Adding icons to menus in VB.NET

Adding icons to menus in VB.NET

Scheduled Pinned Locked Moved Visual Basic
questioncsharpgraphicshelp
1 Posts 1 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.
  • G Offline
    G Offline
    gvborre
    wrote on last edited by
    #1

    Retana Padilla has wrote a fine tool. But... (Excuse me, but my Englisch is not so good...) I 'll try to use this code... And make it better and better... So I have set the EvMeasureItem.ItemHeight = 20 That is just enough to sign a rectangle round a icon (16*16) of 2 pixels width... For instance I want tot use it in the header... Then it goes wrong... The second item in the header comes over the first item... When I go over the first Item with the cursor than you can't see the Icon in the second item in the header... I think that the code have problems with: The sub MeasureItems... I don't understand very good how it's works. Especially... EvMeasureItem.ItemWidth = CInt(EvMeasureItem.Graphics.MeasureString (GetRealText(Mi), m_Font, 10000, sf).Width) + 10 (I have make it like this... EvMeasureItem.ItemWidth = CInt(EvMeasureItem.Graphics.MeasureString (GetRealText(Mi), m_Font, 10000, sf).Width) + 30 It is better but not good enough... And... Also with the function GetRealText... Can it be that sometimes the code don't got the real length in pixels?... Another question is... Is it also possible to manipulate the Item ----------------- I hope that someone can help me ... Vriendelijke groeten Gilbert

    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