當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。