sl@0: using System; sl@0: using System.Collections.Generic; sl@0: using System.ComponentModel; sl@0: using System.Data; sl@0: using System.Drawing; sl@0: using System.Linq; sl@0: using System.Text; sl@0: using System.Threading.Tasks; sl@0: using System.Windows.Forms; sl@0: using CodeProject.Dialog; sl@0: sl@0: namespace SharpDisplayManager sl@0: { sl@0: public partial class MainForm : Form sl@0: { sl@0: public MainForm() sl@0: { sl@0: InitializeComponent(); sl@0: } sl@0: sl@0: private void buttonFont_Click(object sender, EventArgs e) sl@0: { sl@0: //fontDialog.ShowColor = true; sl@0: //fontDialog.ShowApply = true; sl@0: fontDialog.ShowEffects = true; sl@0: //fontDialog.ShowHelp = true; sl@0: sl@0: //fontDlg.MaxSize = 40; sl@0: //fontDlg.MinSize = 22; sl@0: sl@0: //fontDialog.Parent = this; sl@0: //fontDialog.StartPosition = FormStartPosition.CenterParent; sl@0: sl@0: //DlgBox.ShowDialog(fontDialog); sl@0: sl@0: //if (fontDialog.ShowDialog(this) != DialogResult.Cancel) sl@0: if (DlgBox.ShowDialog(fontDialog) != DialogResult.Cancel) sl@0: { sl@0: sl@0: MsgBox.Show("MessageBox MsgBox", "MsgBox caption"); sl@0: sl@0: //MessageBox.Show("Ok"); sl@0: //textBox1.Font = fontDlg.Font; sl@0: //label1.Font = fontDlg.Font; sl@0: //textBox1.BackColor = fontDlg.Color; sl@0: //label1.ForeColor = fontDlg.Color; sl@0: } sl@0: } sl@0: sl@0: private void buttonCapture_Click(object sender, EventArgs e) sl@0: { sl@0: System.Drawing.Bitmap bmp = new System.Drawing.Bitmap(tableLayoutPanel.Width, tableLayoutPanel.Height); sl@0: tableLayoutPanel.DrawToBitmap(bmp, tableLayoutPanel.ClientRectangle); sl@0: bmp.Save("c:\\capture.png"); sl@0: } sl@0: } sl@0: }