本文整理匯總了C#中System.Windows.Forms.PictureBox.SetBounds方法的典型用法代碼示例。如果您正苦於以下問題:C# PictureBox.SetBounds方法的具體用法?C# PictureBox.SetBounds怎麽用?C# PictureBox.SetBounds使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Windows.Forms.PictureBox
的用法示例。
在下文中一共展示了PictureBox.SetBounds方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: cEditor
public cEditor(fMain fmain, Panel editor, PictureBox rule, PictureBox report, TabPage editorTab) {
m_fmain = fmain;
m_editor = editor;
m_editor.AutoScroll = true;
m_picRule = rule;
m_picRule.SetBounds(cUtil.mp(1), cUtil.mp(1), cUtil.mp(50), cUtil.mp(297));
m_picRule.BackColor = Color.PeachPuff;
m_picReport = report;
m_picReport.SetBounds(cUtil.mp(50) + cUtil.mp(1), cUtil.mp(1), cUtil.mp(210), cUtil.mp(297));
m_picReport.BackColor = Color.Beige;
m_editorTab = editorTab;
}
示例2: cEditor
public cEditor(fMain fmain, Panel editor, PictureBox rule, PictureBox report, TabPage editorTab) {
m_fmain = fmain;
m_editor = editor;
m_editor.AutoScroll = true;
m_picRule = rule;
m_picRule.SetBounds(cUtil.mp(1), cUtil.mp(1), cUtil.mp(50), cUtil.mp(297));
m_picRule.BackColor = Color.PeachPuff;
m_picReport = report;
m_picReport.SetBounds(cUtil.mp(50) + cUtil.mp(1), cUtil.mp(1), cUtil.mp(210), cUtil.mp(297));
m_picReport.BackColor = Color.Beige;
m_picReport.Paint += new PaintEventHandler(m_picReport_Paint);
m_picRule.Paint += new PaintEventHandler(m_picRule_Paint);
// mouse events
//
m_picReport.MouseDown += new MouseEventHandler(m_picReport_MouseDown);
m_picReport.MouseUp += new MouseEventHandler(m_picReport_MouseUp);
m_picReport.MouseMove += new MouseEventHandler(m_picReport_MouseMove);
// mouse well
//
// se me cae un lagrimon :(
//
m_picReport.Click += (s, e) => { editor.Focus(); };
// tab
//
m_editorTab = editorTab;
m_editorTab.Enter += (s, e) => { cMainEditor.setDocActive(this); };
m_editorTab.Tag = this;
}
示例3: ShowGridError
/// <summary>Hiển thị thông báo lỗi trên lưới
/// </summary>
public static void ShowGridError(GridControl grid, string ErrorMsg)
{
if (grid.Controls.ContainsKey("picErrorIcon") == false)
{
Icon icon = System.Drawing.SystemIcons.Error;
PictureBox pictureBoxTemp = new PictureBox();
pictureBoxTemp.Name = "picErrorIcon";
pictureBoxTemp.BackColor = Color.Transparent;
pictureBoxTemp.Image = icon.ToBitmap();
pictureBoxTemp.SizeMode = PictureBoxSizeMode.StretchImage;
//pictureBoxTemp.Location = new Point(grid.Width - 50, 3);
pictureBoxTemp.SetBounds(grid.Width - 30, 10, 20, 20);
grid.Controls.Add(pictureBoxTemp);
System.Windows.Forms.ToolTip toolTip1 = new System.Windows.Forms.ToolTip();
toolTip1.SetToolTip(pictureBoxTemp, ErrorMsg);
}
else
{
grid.Controls["picErrorIcon"].Visible = true;
}
}