本文整理汇总了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;
}
}