当前位置: 首页>>代码示例>>C#>>正文


C# PictureBox.SetBounds方法代码示例

本文整理汇总了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;
        }
开发者ID:javiercrowsoft,项目名称:CSReports.net,代码行数:15,代码来源:cEditor.cs

示例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;
        }
开发者ID:javiercrowsoft,项目名称:CSReports.net,代码行数:36,代码来源:cEditor.cs

示例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;
            }
        }
开发者ID:khanhdtn,项目名称:my-fw-win,代码行数:24,代码来源:GridValidation.cs


注:本文中的System.Windows.Forms.PictureBox.SetBounds方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。