Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to change the font of the menu items in vb.net

Posted on 2004-10-14
3
Medium Priority
?
315 Views
Last Modified: 2013-12-03
I give up I searched the whole web but was not able to find an answer.

is there a good way to change the fonts of the menu header and menu items in windows forms by vb.net.
Please help?
0
Comment
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 375 total points
ID: 12313073
0
 
LVL 19

Expert Comment

by:arif_eqbal
ID: 12316552
Yu need to Handle the DrawItem Event of all the MenuItems you need to change the Font for.

Write the Following Code on the DrawItem event of each MenuItem or in a Single method that Handles all the Menus DrawItem Event

        'get the Text To Draw
        Dim Txt As String = CType(sender, MenuItem).Text
        'Set The Font Color
        Dim MyBrush As System.Drawing.Brush = System.Drawing.Brushes.Black
        'Set The Font Name & Size
        Dim MyFont As New Font("Verdana", 10, GraphicsUnit.Pixel)
        'Draw The String
        e.Graphics.DrawString(Txt, MyFont, MyBrush, e.Bounds.X, e.Bounds.Y)

0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What do responsible coders do? They don't take detrimental shortcuts. They do take reasonable security precautions, create important automation, implement sufficient logging, fix things they break, and care about users.
This article will show how Aten was able to supply easy management and control for Artear's video walls and wide range display configurations of their newsroom.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Starting up a Project

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question