How do I use the FontDialog class to set a control’s font

It is straight-forward. Create an instance of the class and call its ShowDialog method. FontDialog fontDialog1 = new FontDialog(); fontDialog1.ShowColor = true; if(fontDialog1.ShowDialog() != DialogResult.Cancel ) { textBox1.Font = fontDialog1.Font ; textBox1.ForeColor = fontDialog1.Color; } textBox1.Text = ‘this is a test’;

How do I set the font for a control

Use the Font property for the control along with the Font class in the System.Drawing class. button1.Font = new Font (‘Courier’, 10, FontStyle.Bold);

How do I use the system clipboard

The SetDataObject and GetDataObject methods in the Clipboard class found in the System.Windows.Forms namespace allows you to access the clipboard. Here is some code. string text = ‘Some text for the clipboard’; Clipboard.SetDataObject(text); //clipboard now has ‘Some text for the clipboard’ text = ”; //zap text so it can be reset… IDataObject data = Clipboard.GetDataObject(); if(data.GetDataPresent(DataFormats.Text)) { text = (String)data.GetData(DataFormats.Text); //text is now back to ‘Some text for the clipboard’ }