Use Font from Form to paint string on a form : Form Frame Window : GUI Windows Form C# Source Code


Custom Search

C# Source Code » GUI Windows Form » Form Frame Window »

 

Use Font from Form to paint string on a form








    
 
using System;
using System.Drawing;
using System.Windows.Forms;

class InheritHelloWorld : Form {
    public static void Main() {
        Application.Run(new InheritHelloWorld());
    }
    public InheritHelloWorld() {
        Text = "Inherit " + Text;
    }
    protected override void OnPaint(PaintEventArgs pea) {
        Graphics graphics = pea.Graphics;

        graphics.DrawString("Hello from InheritHelloWorld!",
                        Font, Brushes.Black, 0, 100);
    }
}

 
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo GUI Windows Form
» Form Frame Window