标题:不明白这个
取消只看楼主
水冰
Rank: 1
等 级:新手上路
帖 子:7
专家分:5
注 册:2013-3-30
结帖率:50%
已结贴  问题点数:10 回复次数:2 
不明白这个
using System;
using System.Collections.Generic;
using
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ch1_3
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

      

        private void button1_Click(object sender, EventArgs e)
        {
            int widthmin = System.Decimal.ToInt32(numericUpDown1.Value);
            int heightmin = System.Decimal.ToInt32(numericUpDown3.Value);
            int widthmax = System.Decimal.ToInt32(numericUpDown2.Value);
            int heightmax = System.Decimal.ToInt32(numericUpDown4.Value);
            DialogResult dr, dr2;
            if (widthmin > widthmax)
            {
                dr = MessageBox.Show("设置的最小宽度比最大宽度还大,如果坚持此设置,窗体的宽度将固定为最大宽度",
                    "警告",MessageBoxButtons.OKCancel,MessageBoxIcon.Warning);
                if (dr == DialogResult.OK)
                {
                }
                else if (dr == DialogResult.Cancel)
                {
                    numericUpDown1.Value = 300;
                    numericUpDown2.Value = 300;
                    numericUpDown3.Value = 300;
                    numericUpDown4.Value = 300;
                }
            }
            if (heightmin > heightmax)
            {
                dr2 = MessageBox.Show("设置的最小高度比最大高度还大,如果坚持此设置,窗体的宽度将固定为最大高度"
                    ,"警告",MessageBoxButtons.OKCancel,MessageBoxIcon.Warning);
                if (dr2 == DialogResult.OK)
                {
                }
                else if (dr2 == DialogResult.Cancel)
                {
                    numericUpDown3.Value = 300;
                    numericUpDown4.Value = 300;
                }
            }
            widthmin = System.Decimal.ToInt32(numericUpDown1.Value);
            heightmin = System.Decimal.ToInt32(numericUpDown3.Value);
            widthmax = System.Decimal.ToInt32(numericUpDown2.Value);
            heightmax = System.Decimal.ToInt32(numericUpDown4.Value);
            Size p1 = new Size(widthmin, heightmin);
            Size p2 = new Size(widthmax, heightmax);
            this.MinimumSize = p1;
            this.MaximumSize = p2;
        }
    }
}
错误    1    “ch1_3.Form1”不包含“groupBox1_Enter”的定义,并且找不到可接受类型为“ch1_3.Form1”的第一个参数的扩展方法“groupBox1_Enter”(是否缺少 using 指令或程序集引用?)    I:\娱乐\ch1-3\ch1-3\Form1.Designer.cs    65    66    ch1-3
搜索更多相关主题的帖子: namespace void private public 
2013-04-02 17:59
水冰
Rank: 1
等 级:新手上路
帖 子:7
专家分:5
注 册:2013-3-30
得分:0 
错误    1    “ch1_3.Form1”不包含“numericUpDown3_ValueChanged”的定义,并且找不到可接受类型为“ch1_3.Form1”的第一个参数的扩展方法“numericUpDown3_ValueChanged”(是否缺少 using 指令或程序集引用?)    I:\娱乐\ch1-3\ch1-3\Form1.Designer.cs    117    78    ch1-3
首先感谢您的回答,可是为何我还什么都没改,错误就变成这样了?
2013-04-06 13:01
水冰
Rank: 1
等 级:新手上路
帖 子:7
专家分:5
注 册:2013-3-30
得分:0 
对的,对的,谢了呀!
2013-04-07 16:55



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-402897-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.908452 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved