Results 1 to 4 of 4

Thread: Adding icon to Menu items?

  1. #1

    Thread Starter
    Registered User
    Join Date
    Apr 2003
    Location
    Klang, Selangor, Malaysia
    Posts
    163

    Question Adding icon to Menu items?

    How can I add icons to Menu items?

    For example, see the attachment (GIF file).

    If need to code, please show me the source code.

    Please guide. Thank you.
    Attached Images Attached Images  

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Try the proj I'd posted here in this link .
    http://www.vbforums.com/showthread.p...highlight=menu
    enjoy !

  3. #3
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Did you create your own menu in a new solution ? if so , then you need to change OwnerDraw property to "True" as it's important step before your menuitems have the effects .

  4. #4

    Thread Starter
    Registered User
    Join Date
    Apr 2003
    Location
    Klang, Selangor, Malaysia
    Posts
    163
    It's working fine now!

    But I have a few question here whether can be solved or not? I'm trying to set the menu as similar to most Microsoft programs.

    1) So far, We are using e.ItemHeight = 15 to set the size of the menu item. How can I set it to the default height and width of a menu item?

    2) We are using New Font("Tahoma", 8) to set the font of the menu item. How can I set it to the default font of the menu item?

    3) To display the shortcut text, how can I set it to the right indent of the menu item, like what we obverse in most Microsoft program.

    4) We have to specify the coordinate to draw the icon of the menu item. How can I draw the icon to the default place of the menu item, like what we obverse in most Microsoft program.

    Please guide, thank you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width