Hotkey Prefix : Text Rendering : Graphics C# Source Code


Custom Search

C# Source Code » Graphics » Text Rendering »

 

Hotkey Prefix








    
 


using System;
using System.Drawing;
using System.Drawing.Text;
using System.Windows.Forms;
   
class UnderlinedText: Form
{
     public static void Main()
     {
          Application.Run(new UnderlinedText());
     }
     public UnderlinedText()
     {
          Text = "Underlined Text Using HotkeyPrefix";
          Font = new Font("Times New Roman", 14);
          ResizeRedraw = true; 
     }
     protected override void OnPaint(PaintEventArgs pea)
     {
          DoPage(pea.Graphics, ForeColor,ClientSize.Width, ClientSize.Height);
     }     
     protected void DoPage(Graphics grfx, Color clr, int cx, int cy)
     {
          string       str    = "This is some &u&n&d&e&r&l&i&n&e&d text!";
          StringFormat strfmt = new StringFormat();
   
          strfmt.HotkeyPrefix = HotkeyPrefix.Show;
   
          grfx.DrawString(str, Font, new SolidBrush(clr), 0, 0, strfmt);
     }
}

 
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Graphics
» Text Rendering