First contrib.
2 using System.Collections.Generic;
3 using System.ComponentModel;
8 using System.Threading.Tasks;
9 using System.Windows.Forms;
10 using CodeProject.Dialog;
12 namespace SharpDisplayManager
14 public partial class MainForm : Form
18 InitializeComponent();
21 private void buttonFont_Click(object sender, EventArgs e)
23 //fontDialog.ShowColor = true;
24 //fontDialog.ShowApply = true;
25 fontDialog.ShowEffects = true;
26 //fontDialog.ShowHelp = true;
28 //fontDlg.MaxSize = 40;
29 //fontDlg.MinSize = 22;
31 //fontDialog.Parent = this;
32 //fontDialog.StartPosition = FormStartPosition.CenterParent;
34 //DlgBox.ShowDialog(fontDialog);
36 //if (fontDialog.ShowDialog(this) != DialogResult.Cancel)
37 if (DlgBox.ShowDialog(fontDialog) != DialogResult.Cancel)
40 MsgBox.Show("MessageBox MsgBox", "MsgBox caption");
42 //MessageBox.Show("Ok");
43 //textBox1.Font = fontDlg.Font;
44 //label1.Font = fontDlg.Font;
45 //textBox1.BackColor = fontDlg.Color;
46 //label1.ForeColor = fontDlg.Color;
50 private void buttonCapture_Click(object sender, EventArgs e)
52 System.Drawing.Bitmap bmp = new System.Drawing.Bitmap(tableLayoutPanel.Width, tableLayoutPanel.Height);
53 tableLayoutPanel.DrawToBitmap(bmp, tableLayoutPanel.ClientRectangle);
54 bmp.Save("c:\\capture.png");