20 December, 2014

How to use FontDailongBox in Winform c#

        private void button1_Click(object sender, EventArgs e)
        {
            DialogResult result = fontDialog1.ShowDialog();
            // See if OK was pressed.
            if (result == DialogResult.OK)
            {
                // Get Font.
                Font font = fontDialog1.Font;
                // Set TextBox properties.
                this.lblLabName.Text = string.Format("Font is­: {0}", font.Name);
                this.lblLabName.Font = font;
            }
        }

No comments:

Post a Comment