C#语言实例源码系列-实现电脑显示器的各种设置

news2024/10/1 17:15:40
专栏分享
  • 点击跳转=>Unity3D特效百例
  • 点击跳转=>案例项目实战源码
  • 点击跳转=>游戏脚本-辅助自动化
  • 点击跳转=>Android控件全解手册

👉关于作者

众所周知,人生是一个漫长的流程,不断克服困难,不断反思前进的过程。在这个过程中会产生很多对于人生的质疑和思考,于是我决定将自己的思考,经验和故事全部分享出来,以此寻找共鸣 !!!
专注于Android/Unity和各种游戏开发技巧,以及各种资源分享(网站、工具、素材、源码、游戏等)
有什么需要欢迎私我,交流群让学习不再孤单

在这里插入图片描述

👉实践过程

😜效果

在这里插入图片描述

😜代码

public partial class Form1 : Form
{
    public Form1()
    {
        InitializeComponent();
    }
    string MaxValue;//显示器支持的最大刷新率
    string MinValue;//显示器支持的最小刷新率
    string NowValue;//当前刷新率
    bool flag = true;

    public const uint WM_SYSCOMMAND = 0x0112;
    public const uint SC_MONITORPOWER = 0xF170;
    [DllImport("user32")]
    public static extern IntPtr SendMessage(IntPtr hWnd, uint wMsg, uint wParam, int lParam);

    public enum DMDO
    {
        DEFAULT = 0,
        D90 = 1,
        D180 = 2,
        D270 = 3
    }

    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
    struct DEVMODE
    {
        public const int DM_DISPLAYFREQUENCY = 0x400000;
        public const int DM_PELSWIDTH = 0x80000;
        public const int DM_PELSHEIGHT = 0x100000;
        public const int DM_BITSPERPEL = 262144;
        private const int CCHDEVICENAME = 32;
        private const int CCHFORMNAME = 32;
        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = CCHDEVICENAME)]
        public string dmDeviceName;
        public short dmSpecVersion;
        public short dmDriverVersion;
        public short dmSize;
        public short dmDriverExtra;
        public int dmFields;
        public int dmPositionX;
        public int dmPositionY;
        public DMDO dmDisplayOrientation;
        public int dmDisplayFixedOutput;
        public short dmColor;
        public short dmDuplex;
        public short dmYResolution;
        public short dmTTOption;
        public short dmCollate;
        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = CCHFORMNAME)]
        public string dmFormName;
        public short dmLogPixels;
        public int dmBitsPerPel;
        public int dmPelsWidth;
        public int dmPelsHeight;
        public int dmDisplayFlags;
        public int dmDisplayFrequency;
        public int dmICMMethod;
        public int dmICMIntent;
        public int dmMediaType;
        public int dmDitherType;
        public int dmReserved1;
        public int dmReserved2;
        public int dmPanningWidth;
        public int dmPanningHeight;
    }

    [DllImport("user32.dll", CharSet = CharSet.Auto)]
    static extern int ChangeDisplaySettings([In] ref DEVMODE lpDevMode, int dwFlags);


    private void Form1_Load(object sender, EventArgs e)
    {
        groupBox5.Text = "当前时间:" + DateTime.Now.ToString();
        ManagementObjectSearcher searcher = new ManagementObjectSearcher("select * from Win32_VideoController");
        foreach(ManagementObject myobject in searcher.Get() )
        {
            string Vname = myobject["Name"].ToString();
            if (Vname.Length >40)
            {
                string a = Vname.Substring(0,45);
                string b = Vname.Substring(46);
                lblInfo.Text = a + "\n" + b;
            }
            else
            {
                lblInfo.Text = Vname;
            }
            string colorValue = myobject["CurrentNumberOfColors"].ToString();
            if (colorValue == "65536")
            {
                comboBox1.SelectedIndex = 0;
            }
            else
            {
                comboBox1.SelectedIndex = 1;
            }
            MaxValue=myobject["MaxRefreshRate"].ToString();
            if (Convert.ToInt32(MaxValue) > 85)
                MaxValue = "85";
            MinValue = myobject["MinRefreshRate"].ToString();
            NowValue=myobject["CurrentRefreshRate"].ToString();
            AddHZ();
            GetDis();
            ChangeDis(1);
        }

    }
    int dWidth = 0;
    int dHeight = 0;
    private void GetDis()//获取分辨率
    {
        Size s = SystemInformation.PrimaryMonitorSize;
        dWidth = s.Width;
        dHeight = s.Height;
        lblDisInfo.Text = dWidth.ToString() + " × " + dHeight.ToString() + " 像素";
    }

    private void ChangeDis(int i)//变换分辨率
    {
        int dValue;
        dValue = trackBar1.Value;
        if (i == 0)
        {
            switch (dValue)
            {
                case 0: dWidth = 800; dHeight = 600; break;
                case 1: dWidth = 1024; dHeight = 768; break;
                case 2: dWidth = 1152; dHeight = 864; break;
                case 3: dWidth = 1280; dHeight = 600; break;
                case 4: dWidth = 1280; dHeight = 720; break;
                case 5: dWidth = 1280; dHeight = 768; break;
                case 6: dWidth = 1280; dHeight = 760; break;
                case 7: dWidth = 1280; dHeight = 1024; break;
                case 8: dWidth = 1400; dHeight = 1050; break;
                case 9: dWidth = 1600; dHeight = 900; break;
                case 10: dWidth = 1600; dHeight = 1200; break;
            }
            lblDisInfo.Text = dWidth.ToString() + " × " + dHeight.ToString() + " 像素";
        }
        else
        {
            int dSum=dWidth+dHeight;
            switch (dSum)
            {
                case 1400: trackBar1.Value = 0; break;
                case 1792: trackBar1.Value = 1; break;
                case 2016: trackBar1.Value = 2; break;
                case 1880: trackBar1.Value = 3; break;
                case 2000: trackBar1.Value = 4; break;
                case 2048: trackBar1.Value = 5; break;
                case 2240: trackBar1.Value = 6; break;
                case 2304: trackBar1.Value = 7; break;
                case 2450: trackBar1.Value = 8; break;
                case 2500: trackBar1.Value = 9; break;
                case 2800: trackBar1.Value = 10; break;
            }
        }
    }


    private void AddHZ()
    {
        int[] hz = new int[] { 60, 70, 75, 85, 100, 120 };
        comboBox2.Items.Clear();
        if (checkBox1.Checked)
        {
            for (int i = 0; i < hz.Length; i++)
            {
                if (hz[i] <= Convert.ToInt32(MaxValue))
                {
                    comboBox2.Items.Add(hz[i].ToString() + "赫兹");
                }
            }
            comboBox2.Text = NowValue + "赫兹";
        }
        else
        {
            for (int j = 0; j < hz.Length; j++)
            {
                comboBox2.Items.Add(hz[j].ToString() + "赫兹");
            }
            comboBox2.Text = NowValue + "赫兹";
        }
    }

    private void checkBox1_CheckedChanged(object sender, EventArgs e)
    {
        AddHZ();
    }

    private void button2_Click(object sender, EventArgs e)
    {
        Application.Exit();
    }

    private void trackBar1_Scroll(object sender, EventArgs e)
    {
        ChangeDis(0);
    }

    private void radioButton1_CheckedChanged(object sender, EventArgs e)
    {
        if (radioButton1.Checked)
        {
            groupBox1.Enabled = true;
            groupBox2.Enabled = true;
            groupBox3.Enabled = true;
            groupBox4.Enabled = true;
        }
        else
        {
            groupBox1.Enabled = false;
            groupBox2.Enabled = false;
            groupBox3.Enabled = false;
            groupBox4.Enabled = false;
        }
    }

    private void radioButton2_CheckedChanged(object sender, EventArgs e)
    {
        if (radioButton2.Checked)
        {
            groupBox5.Enabled = true;
        }
        else
        {
            groupBox5.Enabled = false;
        }
    }

    private void button1_Click(object sender, EventArgs e)
    {
        if (radioButton1.Checked)//设置分辨率、颜色质量、刷新率
        {
            long RetVal = 0;
            DEVMODE dm = new DEVMODE();
            dm.dmSize = (short)Marshal.SizeOf(typeof(DEVMODE));
            dm.dmPelsWidth = dWidth;//宽
            dm.dmPelsHeight = dHeight;//高
            int f =Convert.ToInt32(comboBox2.Text.Trim().Remove(comboBox2.Text.Trim().Length-2));
            dm.dmDisplayFrequency = f;//刷新率
            if (comboBox1.SelectedIndex == 0)
                dm.dmBitsPerPel = 16;
            else
                dm.dmBitsPerPel = 32;
            dm.dmFields = DEVMODE.DM_PELSWIDTH | DEVMODE.DM_PELSHEIGHT | DEVMODE.DM_DISPLAYFREQUENCY | DEVMODE.DM_BITSPERPEL;
            RetVal = ChangeDisplaySettings(ref dm, 0);
        }
        if (radioButton2.Checked)//关闭显示器
        {
            timer1.Start();
            this.Close();
        }
    }

    private void timer1_Tick(object sender, EventArgs e)
    {
        if (dateTimePicker1.Text == DateTime.Now.ToLongTimeString())
        {
            SendMessage(this.Handle, WM_SYSCOMMAND, SC_MONITORPOWER, 2);
            timer1.Stop();
        }
    }

    private void Form1_FormClosing(object sender, FormClosingEventArgs e)
    {
        this.Hide();
        if (flag)
        {
            e.Cancel = true;
        }
    }

    private void 退出ToolStripMenuItem_Click(object sender, EventArgs e)
    {
        flag = false;
        Application.Exit();
    }

    private void 显示ToolStripMenuItem_Click(object sender, EventArgs e)
    {
        this.Show();
    }

    private void notifyIcon1_MouseDoubleClick(object sender, MouseEventArgs e)
    {
        this.Show();
    }

    private void timer2_Tick(object sender, EventArgs e)
    {
        groupBox5.Text = "当前时间:" + DateTime.Now.ToString();
    }
}
partial class Form1
{
    /// <summary>
    /// 必需的设计器变量。
    /// </summary>
    private System.ComponentModel.IContainer components = null;

    /// <summary>
    /// 清理所有正在使用的资源。
    /// </summary>
    /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
    protected override void Dispose(bool disposing)
    {
        if (disposing && (components != null))
        {
            components.Dispose();
        }
        base.Dispose(disposing);
    }

    #region Windows 窗体设计器生成的代码

    /// <summary>
    /// 设计器支持所需的方法 - 不要
    /// 使用代码编辑器修改此方法的内容。
    /// </summary>
    private void InitializeComponent()
    {
        this.components = new System.ComponentModel.Container();
        System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
        this.groupBox1 = new System.Windows.Forms.GroupBox();
        this.lblDisInfo = new System.Windows.Forms.Label();
        this.label2 = new System.Windows.Forms.Label();
        this.label1 = new System.Windows.Forms.Label();
        this.trackBar1 = new System.Windows.Forms.TrackBar();
        this.groupBox2 = new System.Windows.Forms.GroupBox();
        this.lblInfo = new System.Windows.Forms.Label();
        this.groupBox3 = new System.Windows.Forms.GroupBox();
        this.comboBox1 = new System.Windows.Forms.ComboBox();
        this.groupBox4 = new System.Windows.Forms.GroupBox();
        this.checkBox1 = new System.Windows.Forms.CheckBox();
        this.comboBox2 = new System.Windows.Forms.ComboBox();
        this.groupBox5 = new System.Windows.Forms.GroupBox();
        this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker();
        this.label4 = new System.Windows.Forms.Label();
        this.button1 = new System.Windows.Forms.Button();
        this.button2 = new System.Windows.Forms.Button();
        this.radioButton1 = new System.Windows.Forms.RadioButton();
        this.radioButton2 = new System.Windows.Forms.RadioButton();
        this.timer1 = new System.Windows.Forms.Timer(this.components);
        this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components);
        this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
        this.显示ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
        this.退出ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
        this.timer2 = new System.Windows.Forms.Timer(this.components);
        this.groupBox1.SuspendLayout();
        ((System.ComponentModel.ISupportInitialize)(this.trackBar1)).BeginInit();
        this.groupBox2.SuspendLayout();
        this.groupBox3.SuspendLayout();
        this.groupBox4.SuspendLayout();
        this.groupBox5.SuspendLayout();
        this.contextMenuStrip1.SuspendLayout();
        this.SuspendLayout();
        // 
        // groupBox1
        // 
        this.groupBox1.Controls.Add(this.lblDisInfo);
        this.groupBox1.Controls.Add(this.label2);
        this.groupBox1.Controls.Add(this.label1);
        this.groupBox1.Controls.Add(this.trackBar1);
        this.groupBox1.Location = new System.Drawing.Point(11, 96);
        this.groupBox1.Name = "groupBox1";
        this.groupBox1.Size = new System.Drawing.Size(161, 81);
        this.groupBox1.TabIndex = 0;
        this.groupBox1.TabStop = false;
        this.groupBox1.Text = "屏幕分辨率";
        // 
        // lblDisInfo
        // 
        this.lblDisInfo.AutoSize = true;
        this.lblDisInfo.Location = new System.Drawing.Point(36, 57);
        this.lblDisInfo.Name = "lblDisInfo";
        this.lblDisInfo.Size = new System.Drawing.Size(41, 12);
        this.lblDisInfo.TabIndex = 3;
        this.lblDisInfo.Text = "label3";
        // 
        // label2
        // 
        this.label2.AutoSize = true;
        this.label2.Location = new System.Drawing.Point(134, 29);
        this.label2.Name = "label2";
        this.label2.Size = new System.Drawing.Size(17, 12);
        this.label2.TabIndex = 2;
        this.label2.Text = "多";
        // 
        // label1
        // 
        this.label1.AutoSize = true;
        this.label1.Location = new System.Drawing.Point(15, 29);
        this.label1.Name = "label1";
        this.label1.Size = new System.Drawing.Size(17, 12);
        this.label1.TabIndex = 1;
        this.label1.Text = "少";
        // 
        // trackBar1
        // 
        this.trackBar1.AutoSize = false;
        this.trackBar1.Location = new System.Drawing.Point(33, 26);
        this.trackBar1.Name = "trackBar1";
        this.trackBar1.Size = new System.Drawing.Size(95, 23);
        this.trackBar1.TabIndex = 0;
        this.trackBar1.Scroll += new System.EventHandler(this.trackBar1_Scroll);
        // 
        // groupBox2
        // 
        this.groupBox2.Controls.Add(this.lblInfo);
        this.groupBox2.Location = new System.Drawing.Point(12, 36);
        this.groupBox2.Name = "groupBox2";
        this.groupBox2.Size = new System.Drawing.Size(328, 53);
        this.groupBox2.TabIndex = 2;
        this.groupBox2.TabStop = false;
        this.groupBox2.Text = "显示设备";
        // 
        // lblInfo
        // 
        this.lblInfo.AutoSize = true;
        this.lblInfo.Location = new System.Drawing.Point(10, 20);
        this.lblInfo.Name = "lblInfo";
        this.lblInfo.Size = new System.Drawing.Size(41, 12);
        this.lblInfo.TabIndex = 0;
        this.lblInfo.Text = "label3";
        // 
        // groupBox3
        // 
        this.groupBox3.Controls.Add(this.comboBox1);
        this.groupBox3.Location = new System.Drawing.Point(178, 96);
        this.groupBox3.Name = "groupBox3";
        this.groupBox3.Size = new System.Drawing.Size(161, 81);
        this.groupBox3.TabIndex = 3;
        this.groupBox3.TabStop = false;
        this.groupBox3.Text = "颜色质量";
        // 
        // comboBox1
        // 
        this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
        this.comboBox1.FormattingEnabled = true;
        this.comboBox1.Items.AddRange(new object[] {
        "中(16位)",
        "最高(32位)"});
        this.comboBox1.Location = new System.Drawing.Point(7, 31);
        this.comboBox1.Name = "comboBox1";
        this.comboBox1.Size = new System.Drawing.Size(148, 20);
        this.comboBox1.TabIndex = 0;
        // 
        // groupBox4
        // 
        this.groupBox4.Controls.Add(this.checkBox1);
        this.groupBox4.Controls.Add(this.comboBox2);
        this.groupBox4.Location = new System.Drawing.Point(12, 184);
        this.groupBox4.Name = "groupBox4";
        this.groupBox4.Size = new System.Drawing.Size(327, 85);
        this.groupBox4.TabIndex = 4;
        this.groupBox4.TabStop = false;
        this.groupBox4.Text = "设置刷新频率";
        // 
        // checkBox1
        // 
        this.checkBox1.AutoSize = true;
        this.checkBox1.Checked = true;
        this.checkBox1.CheckState = System.Windows.Forms.CheckState.Checked;
        this.checkBox1.Location = new System.Drawing.Point(7, 56);
        this.checkBox1.Name = "checkBox1";
        this.checkBox1.Size = new System.Drawing.Size(180, 16);
        this.checkBox1.TabIndex = 1;
        this.checkBox1.Text = "隐藏该显示器无法显示的模式";
        this.checkBox1.UseVisualStyleBackColor = true;
        this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);
        // 
        // comboBox2
        // 
        this.comboBox2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
        this.comboBox2.FormattingEnabled = true;
        this.comboBox2.Items.AddRange(new object[] {
        "60赫兹",
        "70赫兹",
        "75赫兹",
        "85赫兹",
        "100赫兹",
        "120赫兹"});
        this.comboBox2.Location = new System.Drawing.Point(6, 20);
        this.comboBox2.Name = "comboBox2";
        this.comboBox2.Size = new System.Drawing.Size(315, 20);
        this.comboBox2.TabIndex = 0;
        // 
        // groupBox5
        // 
        this.groupBox5.Controls.Add(this.dateTimePicker1);
        this.groupBox5.Controls.Add(this.label4);
        this.groupBox5.Enabled = false;
        this.groupBox5.Location = new System.Drawing.Point(12, 296);
        this.groupBox5.Name = "groupBox5";
        this.groupBox5.Size = new System.Drawing.Size(328, 65);
        this.groupBox5.TabIndex = 5;
        this.groupBox5.TabStop = false;
        // 
        // dateTimePicker1
        // 
        this.dateTimePicker1.Checked = false;
        this.dateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.Time;
        this.dateTimePicker1.Location = new System.Drawing.Point(94, 24);
        this.dateTimePicker1.Name = "dateTimePicker1";
        this.dateTimePicker1.ShowCheckBox = true;
        this.dateTimePicker1.ShowUpDown = true;
        this.dateTimePicker1.Size = new System.Drawing.Size(118, 21);
        this.dateTimePicker1.TabIndex = 1;
        // 
        // label4
        // 
        this.label4.AutoSize = true;
        this.label4.Location = new System.Drawing.Point(11, 28);
        this.label4.Name = "label4";
        this.label4.Size = new System.Drawing.Size(77, 12);
        this.label4.TabIndex = 0;
        this.label4.Text = "关闭显示器:";
        // 
        // button1
        // 
        this.button1.Location = new System.Drawing.Point(84, 372);
        this.button1.Name = "button1";
        this.button1.Size = new System.Drawing.Size(75, 23);
        this.button1.TabIndex = 6;
        this.button1.Text = "确定";
        this.button1.UseVisualStyleBackColor = true;
        this.button1.Click += new System.EventHandler(this.button1_Click);
        // 
        // button2
        // 
        this.button2.Location = new System.Drawing.Point(177, 372);
        this.button2.Name = "button2";
        this.button2.Size = new System.Drawing.Size(75, 23);
        this.button2.TabIndex = 7;
        this.button2.Text = "取消";
        this.button2.UseVisualStyleBackColor = true;
        this.button2.Click += new System.EventHandler(this.button2_Click);
        // 
        // radioButton1
        // 
        this.radioButton1.AutoSize = true;
        this.radioButton1.Checked = true;
        this.radioButton1.Location = new System.Drawing.Point(11, 12);
        this.radioButton1.Name = "radioButton1";
        this.radioButton1.Size = new System.Drawing.Size(71, 16);
        this.radioButton1.TabIndex = 8;
        this.radioButton1.TabStop = true;
        this.radioButton1.Text = "基本设置";
        this.radioButton1.UseVisualStyleBackColor = true;
        this.radioButton1.CheckedChanged += new System.EventHandler(this.radioButton1_CheckedChanged);
        // 
        // radioButton2
        // 
        this.radioButton2.AutoSize = true;
        this.radioButton2.Location = new System.Drawing.Point(11, 278);
        this.radioButton2.Name = "radioButton2";
        this.radioButton2.Size = new System.Drawing.Size(71, 16);
        this.radioButton2.TabIndex = 9;
        this.radioButton2.Text = "电源设置";
        this.radioButton2.UseVisualStyleBackColor = true;
        this.radioButton2.CheckedChanged += new System.EventHandler(this.radioButton2_CheckedChanged);
        // 
        // timer1
        // 
        this.timer1.Interval = 1000;
        this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
        // 
        // notifyIcon1
        // 
        this.notifyIcon1.ContextMenuStrip = this.contextMenuStrip1;
        this.notifyIcon1.Icon = ((System.Drawing.Icon)(resources.GetObject("notifyIcon1.Icon")));
        this.notifyIcon1.Text = "显示器控制";
        this.notifyIcon1.Visible = true;
        this.notifyIcon1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.notifyIcon1_MouseDoubleClick);
        // 
        // contextMenuStrip1
        // 
        this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
        this.显示ToolStripMenuItem,
        this.退出ToolStripMenuItem});
        this.contextMenuStrip1.Name = "contextMenuStrip1";
        this.contextMenuStrip1.Size = new System.Drawing.Size(95, 48);
        // 
        // 显示ToolStripMenuItem
        // 
        this.显示ToolStripMenuItem.Name = "显示ToolStripMenuItem";
        this.显示ToolStripMenuItem.Size = new System.Drawing.Size(94, 22);
        this.显示ToolStripMenuItem.Text = "显示";
        this.显示ToolStripMenuItem.Click += new System.EventHandler(this.显示ToolStripMenuItem_Click);
        // 
        // 退出ToolStripMenuItem
        // 
        this.退出ToolStripMenuItem.Name = "退出ToolStripMenuItem";
        this.退出ToolStripMenuItem.Size = new System.Drawing.Size(94, 22);
        this.退出ToolStripMenuItem.Text = "退出";
        this.退出ToolStripMenuItem.Click += new System.EventHandler(this.退出ToolStripMenuItem_Click);
        // 
        // timer2
        // 
        this.timer2.Enabled = true;
        this.timer2.Interval = 1000;
        this.timer2.Tick += new System.EventHandler(this.timer2_Tick);
        // 
        // Form1
        // 
        this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
        this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
        this.ClientSize = new System.Drawing.Size(351, 403);
        this.Controls.Add(this.radioButton2);
        this.Controls.Add(this.radioButton1);
        this.Controls.Add(this.button2);
        this.Controls.Add(this.button1);
        this.Controls.Add(this.groupBox5);
        this.Controls.Add(this.groupBox4);
        this.Controls.Add(this.groupBox3);
        this.Controls.Add(this.groupBox2);
        this.Controls.Add(this.groupBox1);
        this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
        this.MaximizeBox = false;
        this.MinimizeBox = false;
        this.Name = "Form1";
        this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
        this.Text = "显示器控制";
        this.Load += new System.EventHandler(this.Form1_Load);
        this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing);
        this.groupBox1.ResumeLayout(false);
        this.groupBox1.PerformLayout();
        ((System.ComponentModel.ISupportInitialize)(this.trackBar1)).EndInit();
        this.groupBox2.ResumeLayout(false);
        this.groupBox2.PerformLayout();
        this.groupBox3.ResumeLayout(false);
        this.groupBox4.ResumeLayout(false);
        this.groupBox4.PerformLayout();
        this.groupBox5.ResumeLayout(false);
        this.groupBox5.PerformLayout();
        this.contextMenuStrip1.ResumeLayout(false);
        this.ResumeLayout(false);
        this.PerformLayout();

    }

    #endregion

    private System.Windows.Forms.GroupBox groupBox1;
    private System.Windows.Forms.Label label2;
    private System.Windows.Forms.Label label1;
    private System.Windows.Forms.TrackBar trackBar1;
    private System.Windows.Forms.Label lblDisInfo;
    private System.Windows.Forms.GroupBox groupBox2;
    private System.Windows.Forms.GroupBox groupBox3;
    private System.Windows.Forms.ComboBox comboBox1;
    private System.Windows.Forms.GroupBox groupBox4;
    private System.Windows.Forms.ComboBox comboBox2;
    private System.Windows.Forms.CheckBox checkBox1;
    private System.Windows.Forms.GroupBox groupBox5;
    private System.Windows.Forms.Label label4;
    private System.Windows.Forms.Button button1;
    private System.Windows.Forms.Button button2;
    private System.Windows.Forms.Label lblInfo;
    private System.Windows.Forms.RadioButton radioButton1;
    private System.Windows.Forms.RadioButton radioButton2;
    private System.Windows.Forms.DateTimePicker dateTimePicker1;
    private System.Windows.Forms.Timer timer1;
    private System.Windows.Forms.NotifyIcon notifyIcon1;
    private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
    private System.Windows.Forms.ToolStripMenuItem 显示ToolStripMenuItem;
    private System.Windows.Forms.ToolStripMenuItem 退出ToolStripMenuItem;
    private System.Windows.Forms.Timer timer2;
}

需要的再直接Call我,直接发。

👉其他

📢作者:小空和小芝中的小空
📢转载说明-务必注明来源:https://zhima.blog.csdn.net/
📢这位道友请留步☁️,我观你气度不凡,谈吐间隐隐有王者霸气💚,日后定有一番大作为📝!!!旁边有点赞👍收藏🌟今日传你,点了吧,未来你成功☀️,我分文不取,若不成功⚡️,也好回来找我。

温馨提示点击下方卡片获取更多意想不到的资源。
空名先生

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/95731.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

ARM S5PV210 汇编实现时钟设置代码详解

一、时钟设置的步骤分析 第1步&#xff1a;CLK_SRC寄存器的设置分析 先选择不使用 PLL。让外部 24MHz 原始时钟直接过去&#xff0c;绕过 APLL 那条路。 CLK_SRC 寄存器其实是用来设置 MUX 开关的。在这里先将该寄存器设置为全 0&#xff0c;主要是 bit0 和bit4 设置为 0&am…

安全智能分析技术白皮书 数据共享

数据共享 定义内涵 数据共享 是指在多个用户或多个程序之间遵循一定规则共同享用数据&#xff0c;并进行各种操作、运算和分析的一种技术。数据共享包括数据发布、接口、交换等内容。 技术背景 随着数字经济成为拉动全球经济增长的新引擎&#xff0c;大数据成为经济中重要的…

聊聊零拷贝?

什么是零拷贝 零拷贝是指计算机在执行IO操作的时候&#xff0c;CPU不需要将数据从一个存储区复制到另一个存储区&#xff0c;进而减少上下文切换以及CPU拷贝的时间&#xff0c;这是一种IO操作优化技术 零拷贝不是没有拷贝数据&#xff0c;而是减少用户态&#xff0c;内核态的…

【Python】sklearn中的K-Means聚类

文章目录初步认识初值选取小批初步认识 k-means翻译过来就是K均值聚类算法&#xff0c;其目的是将样本分割为k个簇&#xff0c;而这个k则是KMeans中最重要的参数&#xff1a;n_clusters&#xff0c;默认为8。 下面做一个最简单的聚类 import numpy as np import matplotlib.…

Python基础语法之学习print()函数

在AI时代&#xff0c;编程已不是程序猿、攻城狮的专属属性&#xff0c;而是一个工具&#xff0c;或是一种技巧&#xff0c;本质上跟Word、PPT没啥区别。如果大家现在想掌握一门编程技能的话&#xff0c;那一定是 Python, 因为它既简洁高效&#xff0c;又能快速入门上手。本文将…

JavaWeb语法三:线程不安全问题的原因和解决方案

目录 1.线程的状态 2.线程不安全的原因 2.1&#xff1a;原子性 2.2&#xff1a; 可见性 2.3&#xff1a;有序性 3.解决线程不安全问题 3.1&#xff1a;synchronized 3.1.1&#xff1a;互斥 3.1.2&#xff1a;可重入 3.2&#xff1a;volatile关键字 3.3&#xff1a;w…

傻白入门芯片设计,盘点GPU业界的大佬(十五)

在PC个人电脑时代&#xff0c;英特尔&#xff08;Inter&#xff09;是无可争议的芯片巨头&#xff0c;凭借着X86架构在数据中心CPU中的压倒性地位&#xff0c;一度垄断全球90%的市场份额。然而在人工智能时代&#xff0c;以英伟达&#xff08;NVIDIA&#xff09;为首的GPU、AI芯…

大学生心里健康

开发工具(eclipse/idea/vscode等)&#xff1a; 数据库(sqlite/mysql/sqlserver等)&#xff1a; 功能模块(请用文字描述&#xff0c;至少200字)&#xff1a; 网站前台&#xff1a;关于我们、联系信息文章信息、咨间师信息、服务信息、测试信息 管理员功能&#xff1a; 1、管理关…

[激光原理与应用-60]:激光器 - 光学 - 光的四大理论框架与其层次:几何光学、波动光学、电磁光学、电子光学

目录 第1章 光的四大理论框架与层次 第2章 光的四大理论各自的特点 2.1 几何光学&#xff08;粒子性&#xff09;》光学特征 2.2 波动光学&#xff08;波动性&#xff09; 2.3 电磁光学&#xff08;电学性&#xff09; 2.4 量子光学&#xff08;能量&#xff09; 第1章 光…

【信管4.2】定义范围与WBS

定义范围与WBS上次课程已经说过&#xff0c;今天的内容是非常重要的&#xff0c;可以说是整个范围管理的核心内容。因此&#xff0c;也请各位打醒十二分精神&#xff0c;一起来学习这两个非常重要的过程吧。定义范围定义范围&#xff0c; 是指定项目和产品详细描述的过程&#…

Canvas库 KonvaJS入门 2坐标体系总结

Canvas库 KonvaJS入门 2坐标体系总结一、 准备环境二、konvasJS坐标基本使用演示1. 按坐标放置控件2. 移动group3. 父元素 scale 变化4. 子元素scale变化5. 旋转一、 准备环境 KonvaJS的几个属性值与坐标都有关系&#xff0c;有时候不容易分清坐标如何计算&#xff0c;本文作个…

前端基础_传统Web页面

传统Web页面 传统Web页面就是打开浏览器&#xff0c;整个页面都会打开的应用。例如&#xff0c;笔者的个人网站http://siwei.me就是一个典型的“传统Web应用”&#xff0c;每次单击其中任意一个链接&#xff0c;都会引起页面的整个刷新 传统的页面每次打开&#xff0c;都要把…

π120E60 双通道数字隔离器 完美代替ISO7820FDW

π120E60 双通道数字隔离器 完美代替ISO7820FDW 。具有出色的性能特征和可靠性&#xff0c;整体性能优于光耦和基于其他原理的数字隔离器产品。产品传输通道间彼此独立&#xff0c;可实现多种传输方向的配置&#xff0c;可实现5.0kV rms 隔离耐压等级和 DC 到 200Mbps信号传输。…

Seata实现分布式事务控制

目录 1. 启动Seata 1.1 下载seata 1.2 修改配置文件及初始化 2. 使用Seata实现事务控制 2.1 初始化数据表 2.2 添加配置 1. 启动Seata 1.1 下载seata 下载地址&#xff1a;https://github.com/seata/seata/releases/v1.3.0/ 1.2 修改配置文件及初始化 将下载得到的…

安全智能分析 思路方案

数据共享 定义内涵 数据共享 是指在多个用户或多个程序之间遵循一定规则共同享用数据&#xff0c;并进行各种操作、运算和分析的一种技术。数据共享包括数据发布、接口、交换等内容。 技术背景 随着数字经济成为拉动全球经济增长的新引擎&#xff0c;大数据成为经济中重要的…

[附源码]Node.js计算机毕业设计个人资金账户管理Express

项目运行 环境配置&#xff1a; Node.js最新版 Vscode Mysql5.7 HBuilderXNavicat11Vue。 项目技术&#xff1a; Express框架 Node.js Vue 等等组成&#xff0c;B/S模式 Vscode管理前后端分离等等。 环境需要 1.运行环境&#xff1a;最好是Nodejs最新版&#xff0c;我…

【OpenCV-Python】教程:6-3 Epipolar Geometry 对极几何

OpenCV Python Epipolar Geometry 对极几何 【目标】 学习多视图几何学习极点、对极线、对极约束等等&#xff1b; 【理论】 当我们使用针孔相机拍摄图像时&#xff0c;我们会丢失一个重要的信息&#xff0c;即图像的深度。或者图像中的每个点距离摄像机有多远&#xff0c;…

下一个AI舞台,名叫煤矿

如果大海给贝壳下的定义是珍珠&#xff0c;那么时间给煤的定义就是钻石。2020年初&#xff0c;我们曾经探访过山西一家大型矿山。矿山中的工程师对我们说&#xff0c;现在矿上特别需要新技术&#xff0c;需要数字化、智能化。但现在年轻人&#xff0c;尤其是懂AI、懂云计算的人…

Stm32旧版库函数16——stm32 超声波测距

/******************** (C) COPYRIGHT 2012 ELC ******************** * File Name : main.c * Author : ELCWHUT * Version : V1.0 * Date : 2012-12-05 * Description : 超声波测距的STM32代码&#xff0c;采用HC-HR04…

Git全栈体系(一)

第一章 Git 概述 Git 是一个免费的、开源的分布式版本控制系统&#xff0c;可以快速高效地处理从小型到大型的各种项目。Git 易于学习&#xff0c;占地面积小&#xff0c;性能极快。 它具有廉价的本地库&#xff0c;方便的暂存区域和多个工作流分支等特性。其性能优于 Subvers…