VisualUI Font on Custom Caption Bar Button

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I've added a custom button to my form's caption bar to perform a pin
function. However the font-family that contains the pin/unpin image is
VisualUI (which come with VS.NET). However I can't seem to get this font to
display.

Any ideas on how to get this to work?

using(Font f = new Font("VisualUI", 7F))
{
ControlPaint.DrawStringDisabled( g, "q", f, Color.Black, _rcButton,
StringFormat.GenericDefault);
}
 
You'll notice that that font is only available while visual studio is
running so visual studio is probably just installing it for its own use -
most likely using AddFontResource. It is not a font that you should expect
to be available on the end user's system. I would recommend creating images
that correspond to the pin/unpin image and use that instead.
 
Back
Top