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. How do I make menu flat

How do I make menu flat

Scheduled Pinned Locked Moved Visual Basic
graphicsquestioncsharpvisual-studiohelp
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.
  • T Offline
    T Offline
    the_warlord
    wrote on last edited by
    #1

    :((Hi folks, I got a simple question! How do I make .NET menu look flat like VS. I succeeded in reproducing all but the flatness, it seems that the menu control always follows up my OS (Win200). Here is the function I use to draw my menu items, what am I missing. Please help me out I need it to complete a release (on a no royalty product). Thanks No mather wahat I do my menu still look like 2000 with the .NET feel. ------------------------------------------------------------------------ Sub DrawItems(ByVal EvDrawItems As System.Windows.Forms.DrawItemEventArgs, _ ByVal Mi As MenuItem, _ ByVal m_Icon As Icon) Dim br As Brush Dim fDisposeBrush As Boolean Dim img As Image Dim br2 As New SolidBrush(Color.Silver) Dim iSelFac As Integer = 0 Dim imgblk As Image img = GetIconFromMapping(Mi) EvDrawItems.DrawBackground() EvDrawItems.Graphics.FillRectangle(br2, EvDrawItems.Bounds) EvDrawItems.Graphics.FillRectangle(m_SideBarBrush, EvDrawItems.Bounds.Left, EvDrawItems.Bounds.Top, 24, 26) If CBool(EvDrawItems.State And DrawItemState.Selected) Then iSelFac = 1 End If If Not img Is Nothing Then imgblk = img If CBool(EvDrawItems.State And DrawItemState.Selected) Then Dim GDI As New GDI_Filters.Filters GDI.GrayScale(imgblk) EvDrawItems.Graphics.DrawImage(img, (EvDrawItems.Bounds.Left _ + 6), _ (EvDrawItems.Bounds.Top + 6)) End If EvDrawItems.Graphics.DrawImage(img, (EvDrawItems.Bounds.Left + 6) - iSelFac, _ (EvDrawItems.Bounds.Top + 6) - iSelFac) If Mi.Checked Then If (m_CheckImage <> -1) Then EvDrawItems.Graphics.DrawImage(m_Icons.Images(m_CheckImage), (EvDrawItems.Bounds.Left + 6) - iSelFac, _ (EvDrawItems.Bounds.Top + 6) - iSelFac) Else EvDrawItems.Graphics.DrawImage(m_frmDummy.ImageList1.Images(0), (EvDrawItems.Bounds.Left + 6) - iSelFac, _ (EvDrawItems.Bounds.Top

    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