精华内容
下载资源
问答
  • C#界面设计工具

    2018-06-29 15:17:29
    一款国外的C#界面辅助设计工具,功能十分强大,有pdf说明
  • C#界面设计教程.rar

    2020-05-05 01:16:39
    窗体是可视化程序设计的基础界面,是其他对象的载体和容器。 控件是添加到窗体对象上的对象,每个控件都有自己的属性、方法和事件以完成特定的功能。 Windows应用程序设计还体现了另外一种思维,即对事件的处理。
  • C#界面设计

    2018-07-18 21:46:34
    C#界面设计代码例程,方便进行C#开发使用;对于初学者有一定的帮助。
  • c#界面设计教程

    2018-09-14 16:17:15
    适合C#界面编程入门,C#是一种可视化的程序设计语言。 Windows窗体和控件是开发C#应用程序的基础,窗体和控件在C#程序设计中扮演着重要的角色。在C#中,每个Windows窗体和控件都是对象,都是类的实例。 窗体是可视化...
  • .Net C# 界面设计示例,包含完整的数据库脚本和控件dll。
  • C#界面设计源代码

    热门讨论 2011-11-09 21:47:01
    完整的工程文件 经典界面设计 源代码 提供组件应用
  • C#Winform界面设计.

    2018-02-11 08:20:10
    C# Winform 界面设计 窗口页面跳转 员工信息查询的简单界面
  • .Net C# 界面设计示例源码 包含完整的数据库脚本和控件dll。 .Net C# 界面设计示例源码。
  • 采用c#语言编写的界面登陆程序,同时可以实现主界面与从界面的转换
  • C#界面设计教程PPT课件.pdf
  • c#界面设计

    2014-06-25 16:02:12
    c# 界面设计 包含部分设计界面 考试管理系统
  • C#界面设计教程

    2013-07-13 16:21:58
    C#界面设计教程
  • C#界面设计的一个比较不错的实例,里面的几个控件的联合使用对于初学者来说很重要
  • C#界面设计教程.ppt

    2019-05-13 15:49:53
    窗体是可视化程序设计的基础界面,是其他对象的载体和容器。 控件是添加到窗体对象上的对象,每个控件都有自己的属性、方法和事件以完成特定的功能。 Windows应用程序设计还体现了另外一种思维,即对事件的处理。
  • 图书销售系统 C#windows窗体应用 SQLserval数据库 用的是vs2019,个人课设完成的项目 界面是根据b站上的大佬学习的,里面的功能由自己编写
  • 简易计算器C#界面设计与代码 简易计算器是用vs2008编译的c#程序仅供参考存在不足之处望大家见谅 windows界面设计 using System; using System.Collections.Generic; using ponentModel; using System.Data; using ...
  • C#界面设计课程

    2017-11-08 16:12:31
    C#界面设计课程第9章 9.1 Windows应用程序的结构 9.2 Windows窗体 9.3 窗体控件概述 等
  • C#界面设计之窗体绘制

    千次阅读 2016-04-06 12:41:27
    Windows 窗体设计器生成的代码 /// /// 设计器支持所需的方法 - 不要 /// 使用代码编辑器修改此方法的内容。 /// private void InitializeComponent () { System.ComponentModel....

    先上运行结果啦!
    这里写图片描述

    解决方案管理图:
    这里写图片描述

    主要代码如下:

    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    
    namespace FormDraw
    {
        public partial class DrawForm : Form
        {
            public DrawForm()
            {
                InitializeComponent();
            }
        }
    }
    
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Windows.Forms;
    
    namespace FormDraw
    {
        static class Program
        {
            /// <summary>
            /// 应用程序的主入口点。
            /// </summary>
            [STAThread]
            static void Main()
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                Application.Run(new DrawForm());
            }
        }
    }
    
    namespace FormDraw
    {
        partial class DrawForm
        {
            /// <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()
            {
                System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DrawForm));
                this.mainMenuStrip = new System.Windows.Forms.MenuStrip();
                this.SuspendLayout();
                // 
                // mainMenuStrip
                // 
                this.mainMenuStrip.Location = new System.Drawing.Point(0, 0);
                this.mainMenuStrip.Name = "mainMenuStrip";
                this.mainMenuStrip.Size = new System.Drawing.Size(785, 24);
                this.mainMenuStrip.TabIndex = 0;
                this.mainMenuStrip.Text = "menuStrip1";
                // 
                // DrawForm
                // 
                this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
                this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
                this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
                this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
                this.ClientSize = new System.Drawing.Size(785, 467);
                this.Controls.Add(this.mainMenuStrip);
                this.Cursor = System.Windows.Forms.Cursors.Cross;
                this.MainMenuStrip = this.mainMenuStrip;
                this.Name = "DrawForm";
                this.Text = "窗体绘制";
                this.ResumeLayout(false);
                this.PerformLayout();
    
            }
    
            #endregion
    
            private System.Windows.Forms.MenuStrip mainMenuStrip;
        }
    }
    
    

    不积跬步,无以至千里,加油!

    展开全文
  • C#界面设计之树目录TreeView的使用

    千次阅读 2016-04-22 10:11:16
    还是先上效果图: 主要代码如下:using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text;...namespace TreeDemo

    还是先上效果图:
    这里写图片描述
    主要代码如下:

    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Text;
    using System.Windows.Forms;
    
    namespace TreeDemo
    {
        public partial class frmTree : Form
        {
            public frmTree()
            {
                InitializeComponent();
            }
    
            private List<string> GetAllNodeInfo(TreeView tvDept)
            {
                List<string> lst = new List<string>();
                for (int i = 0; i < tvDept.Nodes.Count; i++)
                {
                    string od = string.Empty;
                    od = string.Format("Level:{0},Nodes:{1},Name:{2},Text:{3}\r\n",
                        tvDept.Nodes[i].Level.ToString().PadLeft(3), tvDept.Nodes[i].Nodes.Count.ToString().PadLeft(3),
                        tvDept.Nodes[i].Name, tvDept.Nodes[i].Text);
                    lst.Add(od);
    
                    if (tvDept.Nodes[i].Nodes.Count > 0)
                    {
                        GetAllNodeInfoSub(tvDept.Nodes[i], lst);
                    }
                }
    
                return lst;
            }
            private void GetAllNodeInfoSub(TreeNode nodeRoot, List<string> lst)
            {
                for (int i = 0; i < nodeRoot.Nodes.Count; i++)
                {
                    string od = string.Empty;
                    od = string.Format("Level:{0},Nodes:{1},Name:{2},Text:{3}\r\n",
                        nodeRoot.Nodes[i].Level.ToString().PadLeft(3), nodeRoot.Nodes[i].Nodes.Count.ToString().PadLeft(3),
                        nodeRoot.Nodes[i].Name, nodeRoot.Nodes[i].Text);
                    lst.Add(od);
    
                    if (nodeRoot.Nodes[i].Nodes.Count > 0)
                    {
                        GetAllNodeInfoSub(nodeRoot.Nodes[i], lst);
                    }
                }
            }
    
            private void frmTree_Load(object sender, EventArgs e)
            {
                treeView1.ExpandAll();
                treeView1.HideSelection = false;
                treeView1.CheckBoxes = checkBox1.Checked;
                treeView1.ShowLines = checkBox2.Checked;
                treeView1.ShowRootLines = checkBox3.Checked;
            }
            private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
            {
                if (e.Node != null)
                {
                    //节点信息
                    string strNodeInfo = string.Empty;
                    strNodeInfo += string.Format("Name:{0}\r\n", e.Node.Name);
                    strNodeInfo += string.Format("Text:{0}\r\n", e.Node.Text);
                    strNodeInfo += string.Format("Nodes:{0}\r\n", e.Node.Nodes.Count.ToString());
                    strNodeInfo += string.Format("Level:{0}\r\n", e.Node.Level);
                    txtNodeInfo.Text = strNodeInfo;
                    //显示窗体
                    switch (e.Node.Text)
                    {
                        case "ndForm1":
                            (new Form1()).ShowDialog();
                            break;
                        case "ndForm2":
                            (new Form2()).ShowDialog();
                            break;
                        case "ndForm3":
                            (new Form3()).ShowDialog();
                            break;
                    }
                }
            }
    
            private void button1_Click(object sender, EventArgs e)
            {
                TreeNode tn = new TreeNode();
                tn.Name = tn.Text = "tn" + DateTime.Now.ToString("yyMMddhhmmss") + DateTime.Now.Millisecond.ToString("D3");
                treeView1.Nodes.Add(tn);
                System.Threading.Thread.Sleep(1);
            }
            private void button2_Click(object sender, EventArgs e)
            {
                if (treeView1.SelectedNode == null)
                {
                    return;
                }
                else
                {
                    if (treeView1.SelectedNode.Parent == null)
                    {
                        button1_Click(null, null);
                    }
                    else
                    {
                        TreeNode tn = new TreeNode();
                        tn.Name = tn.Text = "tn" + DateTime.Now.ToString("yyMMddhhmmss") + DateTime.Now.Millisecond.ToString("D3");
                        treeView1.SelectedNode.Parent.Nodes.Add(tn);
                        System.Threading.Thread.Sleep(1);
                    }
                }
            }
            private void button3_Click(object sender, EventArgs e)
            {
                if (treeView1.SelectedNode == null)
                {
                    return;
                }
                else
                {
                    TreeNode tn = new TreeNode();
                    tn.Name = tn.Text = "tn" + DateTime.Now.ToString("yyMMddhhmmss") + DateTime.Now.Millisecond.ToString("D3");
                    treeView1.SelectedNode.Nodes.Add(tn);
                    System.Threading.Thread.Sleep(1);
                    treeView1.ExpandAll();
                }
            }
            private void button4_Click(object sender, EventArgs e)
            {
                if (treeView1.SelectedNode != null)
                {
                    treeView1.Nodes.Remove(treeView1.SelectedNode);
                }
            }
            private void button5_Click(object sender, EventArgs e)
            {
                if (treeView1.SelectedNode != null)
                {
                    treeView1.SelectedNode.Nodes.Clear();
                }
            }
            private void button7_Click(object sender, EventArgs e)
            {
                treeView1.ExpandAll();
            }
            private void button8_Click(object sender, EventArgs e)
            {
                treeView1.CollapseAll();
            }
            private void checkBox1_CheckedChanged(object sender, EventArgs e)
            {
                treeView1.CheckBoxes = checkBox1.Checked;
                treeView1.ExpandAll();
            }
            private void checkBox2_CheckedChanged(object sender, EventArgs e)
            {
                treeView1.ShowLines = checkBox2.Checked;
                treeView1.ExpandAll();
            }
            private void checkBox3_CheckedChanged(object sender, EventArgs e)
            {
                treeView1.ShowRootLines = checkBox3.Checked;
                treeView1.ExpandAll();
            }
            private void button6_Click(object sender, EventArgs e)
            {
                List<string> lst = GetAllNodeInfo(treeView1);
                txtNodeInfo.Text = string.Empty;
    
                for (int i = 0; i < lst.Count; i++)
                {
                    txtNodeInfo.Text += lst[i];
                    Application.DoEvents();
                }
            }
    
        }
    }
    
    namespace TreeDemo
    {
        partial class frmTree
        {
            /// <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()
            {
                System.Windows.Forms.TreeNode treeNode1 = new System.Windows.Forms.TreeNode("节点1");
                System.Windows.Forms.TreeNode treeNode2 = new System.Windows.Forms.TreeNode("节点4");
                System.Windows.Forms.TreeNode treeNode3 = new System.Windows.Forms.TreeNode("节点5");
                System.Windows.Forms.TreeNode treeNode4 = new System.Windows.Forms.TreeNode("节点3", new System.Windows.Forms.TreeNode[] {
                treeNode2,
                treeNode3});
                System.Windows.Forms.TreeNode treeNode5 = new System.Windows.Forms.TreeNode("节点2", new System.Windows.Forms.TreeNode[] {
                treeNode4});
                System.Windows.Forms.TreeNode treeNode6 = new System.Windows.Forms.TreeNode("节点0", new System.Windows.Forms.TreeNode[] {
                treeNode1,
                treeNode5});
                System.Windows.Forms.TreeNode treeNode7 = new System.Windows.Forms.TreeNode("节点7");
                System.Windows.Forms.TreeNode treeNode8 = new System.Windows.Forms.TreeNode("节点8");
                System.Windows.Forms.TreeNode treeNode9 = new System.Windows.Forms.TreeNode("节点9");
                System.Windows.Forms.TreeNode treeNode10 = new System.Windows.Forms.TreeNode("节点10");
                System.Windows.Forms.TreeNode treeNode11 = new System.Windows.Forms.TreeNode("节点6", new System.Windows.Forms.TreeNode[] {
                treeNode7,
                treeNode8,
                treeNode9,
                treeNode10});
                System.Windows.Forms.TreeNode treeNode12 = new System.Windows.Forms.TreeNode("ndForm1");
                System.Windows.Forms.TreeNode treeNode13 = new System.Windows.Forms.TreeNode("ndForm2");
                System.Windows.Forms.TreeNode treeNode14 = new System.Windows.Forms.TreeNode("ndForm3");
                System.Windows.Forms.TreeNode treeNode15 = new System.Windows.Forms.TreeNode("导航", new System.Windows.Forms.TreeNode[] {
                treeNode12,
                treeNode13,
                treeNode14});
                this.treeView1 = new System.Windows.Forms.TreeView();
                this.lblInfo = new System.Windows.Forms.Label();
                this.txtNodeInfo = new System.Windows.Forms.TextBox();
                this.button1 = new System.Windows.Forms.Button();
                this.button2 = new System.Windows.Forms.Button();
                this.button3 = new System.Windows.Forms.Button();
                this.button4 = new System.Windows.Forms.Button();
                this.button5 = new System.Windows.Forms.Button();
                this.button7 = new System.Windows.Forms.Button();
                this.button8 = new System.Windows.Forms.Button();
                this.checkBox1 = new System.Windows.Forms.CheckBox();
                this.checkBox2 = new System.Windows.Forms.CheckBox();
                this.checkBox3 = new System.Windows.Forms.CheckBox();
                this.button6 = new System.Windows.Forms.Button();
                this.SuspendLayout();
                // 
                // treeView1
                // 
                this.treeView1.BackColor = System.Drawing.SystemColors.Window;
                this.treeView1.Location = new System.Drawing.Point(12, 12);
                this.treeView1.Name = "treeView1";
                treeNode1.Name = "节点1";
                treeNode1.Text = "节点1";
                treeNode2.Name = "节点4";
                treeNode2.Text = "节点4";
                treeNode3.Name = "节点5";
                treeNode3.Text = "节点5";
                treeNode4.Name = "节点3";
                treeNode4.Text = "节点3";
                treeNode5.Name = "节点2";
                treeNode5.Text = "节点2";
                treeNode6.Name = "节点0";
                treeNode6.Text = "节点0";
                treeNode7.Name = "节点7";
                treeNode7.Text = "节点7";
                treeNode8.Name = "节点8";
                treeNode8.Text = "节点8";
                treeNode9.Name = "节点9";
                treeNode9.Text = "节点9";
                treeNode10.Name = "节点10";
                treeNode10.Text = "节点10";
                treeNode11.Name = "节点6";
                treeNode11.Text = "节点6";
                treeNode12.Name = "ndForm1";
                treeNode12.Text = "ndForm1";
                treeNode13.Name = "ndForm2";
                treeNode13.Text = "ndForm2";
                treeNode14.Name = "ndForm3";
                treeNode14.Text = "ndForm3";
                treeNode15.Name = "节点11";
                treeNode15.Text = "导航";
                this.treeView1.Nodes.AddRange(new System.Windows.Forms.TreeNode[] {
                treeNode6,
                treeNode11,
                treeNode15});
                this.treeView1.Size = new System.Drawing.Size(288, 449);
                this.treeView1.TabIndex = 0;
                this.treeView1.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterSelect);
                // 
                // lblInfo
                // 
                this.lblInfo.Location = new System.Drawing.Point(306, 12);
                this.lblInfo.Name = "lblInfo";
                this.lblInfo.Size = new System.Drawing.Size(474, 21);
                this.lblInfo.TabIndex = 2;
                this.lblInfo.Text = "选中的节点信息";
                // 
                // txtNodeInfo
                // 
                this.txtNodeInfo.Location = new System.Drawing.Point(306, 36);
                this.txtNodeInfo.Multiline = true;
                this.txtNodeInfo.Name = "txtNodeInfo";
                this.txtNodeInfo.ReadOnly = true;
                this.txtNodeInfo.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
                this.txtNodeInfo.Size = new System.Drawing.Size(474, 226);
                this.txtNodeInfo.TabIndex = 3;
                // 
                // button1
                // 
                this.button1.Location = new System.Drawing.Point(306, 268);
                this.button1.Name = "button1";
                this.button1.Size = new System.Drawing.Size(75, 23);
                this.button1.TabIndex = 4;
                this.button1.Text = "添加根";
                this.button1.UseVisualStyleBackColor = true;
                this.button1.Click += new System.EventHandler(this.button1_Click);
                // 
                // button2
                // 
                this.button2.Location = new System.Drawing.Point(387, 268);
                this.button2.Name = "button2";
                this.button2.Size = new System.Drawing.Size(75, 23);
                this.button2.TabIndex = 5;
                this.button2.Text = "添加同级";
                this.button2.UseVisualStyleBackColor = true;
                this.button2.Click += new System.EventHandler(this.button2_Click);
                // 
                // button3
                // 
                this.button3.Location = new System.Drawing.Point(468, 268);
                this.button3.Name = "button3";
                this.button3.Size = new System.Drawing.Size(75, 23);
                this.button3.TabIndex = 6;
                this.button3.Text = "添加子级";
                this.button3.UseVisualStyleBackColor = true;
                this.button3.Click += new System.EventHandler(this.button3_Click);
                // 
                // button4
                // 
                this.button4.Location = new System.Drawing.Point(549, 268);
                this.button4.Name = "button4";
                this.button4.Size = new System.Drawing.Size(75, 23);
                this.button4.TabIndex = 7;
                this.button4.Text = "删除选中";
                this.button4.UseVisualStyleBackColor = true;
                this.button4.Click += new System.EventHandler(this.button4_Click);
                // 
                // button5
                // 
                this.button5.Location = new System.Drawing.Point(630, 268);
                this.button5.Name = "button5";
                this.button5.Size = new System.Drawing.Size(150, 23);
                this.button5.TabIndex = 8;
                this.button5.Text = "删除选中子级";
                this.button5.UseVisualStyleBackColor = true;
                this.button5.Click += new System.EventHandler(this.button5_Click);
                // 
                // button7
                // 
                this.button7.Location = new System.Drawing.Point(306, 297);
                this.button7.Name = "button7";
                this.button7.Size = new System.Drawing.Size(75, 23);
                this.button7.TabIndex = 4;
                this.button7.Text = "展开";
                this.button7.UseVisualStyleBackColor = true;
                this.button7.Click += new System.EventHandler(this.button7_Click);
                // 
                // button8
                // 
                this.button8.Location = new System.Drawing.Point(387, 297);
                this.button8.Name = "button8";
                this.button8.Size = new System.Drawing.Size(75, 23);
                this.button8.TabIndex = 5;
                this.button8.Text = "关闭";
                this.button8.UseVisualStyleBackColor = true;
                this.button8.Click += new System.EventHandler(this.button8_Click);
                // 
                // checkBox1
                // 
                this.checkBox1.AutoSize = true;
                this.checkBox1.Location = new System.Drawing.Point(306, 336);
                this.checkBox1.Name = "checkBox1";
                this.checkBox1.Size = new System.Drawing.Size(78, 16);
                this.checkBox1.TabIndex = 9;
                this.checkBox1.Text = "CheckBoxs";
                this.checkBox1.UseVisualStyleBackColor = true;
                this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);
                // 
                // checkBox2
                // 
                this.checkBox2.AutoSize = true;
                this.checkBox2.Location = new System.Drawing.Point(306, 358);
                this.checkBox2.Name = "checkBox2";
                this.checkBox2.Size = new System.Drawing.Size(78, 16);
                this.checkBox2.TabIndex = 10;
                this.checkBox2.Text = "ShowLines";
                this.checkBox2.UseVisualStyleBackColor = true;
                this.checkBox2.CheckedChanged += new System.EventHandler(this.checkBox2_CheckedChanged);
                // 
                // checkBox3
                // 
                this.checkBox3.AutoSize = true;
                this.checkBox3.Location = new System.Drawing.Point(306, 380);
                this.checkBox3.Name = "checkBox3";
                this.checkBox3.Size = new System.Drawing.Size(78, 16);
                this.checkBox3.TabIndex = 11;
                this.checkBox3.Text = "ShowLines";
                this.checkBox3.UseVisualStyleBackColor = true;
                this.checkBox3.CheckedChanged += new System.EventHandler(this.checkBox3_CheckedChanged);
                // 
                // button6
                // 
                this.button6.Location = new System.Drawing.Point(468, 297);
                this.button6.Name = "button6";
                this.button6.Size = new System.Drawing.Size(75, 23);
                this.button6.TabIndex = 12;
                this.button6.Text = "遍历";
                this.button6.UseVisualStyleBackColor = true;
                this.button6.Click += new System.EventHandler(this.button6_Click);
                // 
                // frmTree
                // 
                this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
                this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
                this.ClientSize = new System.Drawing.Size(784, 462);
                this.Controls.Add(this.button6);
                this.Controls.Add(this.checkBox3);
                this.Controls.Add(this.checkBox2);
                this.Controls.Add(this.checkBox1);
                this.Controls.Add(this.button5);
                this.Controls.Add(this.button4);
                this.Controls.Add(this.button3);
                this.Controls.Add(this.button8);
                this.Controls.Add(this.button2);
                this.Controls.Add(this.button7);
                this.Controls.Add(this.button1);
                this.Controls.Add(this.txtNodeInfo);
                this.Controls.Add(this.lblInfo);
                this.Controls.Add(this.treeView1);
                this.MaximizeBox = false;
                this.MaximumSize = new System.Drawing.Size(800, 500);
                this.MinimizeBox = false;
                this.MinimumSize = new System.Drawing.Size(800, 500);
                this.Name = "frmTree";
                this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
                this.Text = "frmTree.cs";
                this.Load += new System.EventHandler(this.frmTree_Load);
                this.ResumeLayout(false);
                this.PerformLayout();
    
            }
    
            #endregion
    
            private System.Windows.Forms.TreeView treeView1;
            private System.Windows.Forms.Label lblInfo;
            private System.Windows.Forms.TextBox txtNodeInfo;
            private System.Windows.Forms.Button button1;
            private System.Windows.Forms.Button button2;
            private System.Windows.Forms.Button button3;
            private System.Windows.Forms.Button button4;
            private System.Windows.Forms.Button button5;
            private System.Windows.Forms.Button button7;
            private System.Windows.Forms.Button button8;
            private System.Windows.Forms.CheckBox checkBox1;
            private System.Windows.Forms.CheckBox checkBox2;
            private System.Windows.Forms.CheckBox checkBox3;
            private System.Windows.Forms.Button button6;
        }
    }
    
    
    展开全文
  • Winform窗体设计器,基于C#源码实现,界面仿VisualStudio,这个窗体设计器可显示出制作窗体上一些必备元素的属性信息源码也是可以编译的。没有使用微软Runtime FormDesigner技术
  • C#界面设计之菜单栏的使用

    千次阅读 2016-04-21 15:40:42
    这里先给出界面效果图: 没有任何触发事件,所以主程序里没有增加代码,下面主要给出控件标注信息的代码:namespace MenuStrip { partial class Form1 { /// /// 必需的设计器变量。 /// private System....

    这里先给出界面效果图:
    这里写图片描述

    没有任何触发事件,所以主程序里没有增加代码,下面主要给出控件标注信息的代码:

    namespace MenuStrip
    {
        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.menuStrip1 = new System.Windows.Forms.MenuStrip();
                this.系统ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
                this.设置ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
                this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
                this.退出ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
                this.帮助ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
                this.关于ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
                this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
                this.复制ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
                this.粘贴ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
                this.textBox1 = new System.Windows.Forms.TextBox();
                this.toolStrip1 = new System.Windows.Forms.ToolStrip();
                this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
                this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
                this.toolStripButton2 = new System.Windows.Forms.ToolStripButton();
                this.toolStripButton3 = new System.Windows.Forms.ToolStripButton();
                this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
                this.toolStripButton4 = new System.Windows.Forms.ToolStripButton();
                this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
                this.toolStripDropDownButton1 = new System.Windows.Forms.ToolStripDropDownButton();
                this.功能1ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
                this.功能2ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
                this.statusStrip1 = new System.Windows.Forms.StatusStrip();
                this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
                this.toolStripProgressBar1 = new System.Windows.Forms.ToolStripProgressBar();
                this.toolStripButton5 = new System.Windows.Forms.ToolStripButton();
                this.toolStripStatusLabel2 = new System.Windows.Forms.ToolStripStatusLabel();
                this.menuStrip1.SuspendLayout();
                this.contextMenuStrip1.SuspendLayout();
                this.toolStrip1.SuspendLayout();
                this.statusStrip1.SuspendLayout();
                this.SuspendLayout();
                // 
                // menuStrip1
                // 
                this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
                this.系统ToolStripMenuItem,
                this.帮助ToolStripMenuItem});
                this.menuStrip1.Location = new System.Drawing.Point(0, 0);
                this.menuStrip1.Name = "menuStrip1";
                this.menuStrip1.Size = new System.Drawing.Size(281, 25);
                this.menuStrip1.TabIndex = 0;
                this.menuStrip1.Text = "menuStrip1";
                // 
                // 系统ToolStripMenuItem
                // 
                this.系统ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
                this.设置ToolStripMenuItem,
                this.toolStripSeparator1,
                this.退出ToolStripMenuItem});
                this.系统ToolStripMenuItem.Name = "系统ToolStripMenuItem";
                this.系统ToolStripMenuItem.Size = new System.Drawing.Size(44, 21);
                this.系统ToolStripMenuItem.Text = "系统";
                // 
                // 设置ToolStripMenuItem
                // 
                this.设置ToolStripMenuItem.Name = "设置ToolStripMenuItem";
                this.设置ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
                this.设置ToolStripMenuItem.Text = "设置";
                // 
                // toolStripSeparator1
                // 
                this.toolStripSeparator1.Name = "toolStripSeparator1";
                this.toolStripSeparator1.Size = new System.Drawing.Size(149, 6);
                // 
                // 退出ToolStripMenuItem
                // 
                this.退出ToolStripMenuItem.Name = "退出ToolStripMenuItem";
                this.退出ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
                this.退出ToolStripMenuItem.Text = "退出";
                // 
                // 帮助ToolStripMenuItem
                // 
                this.帮助ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
                this.关于ToolStripMenuItem});
                this.帮助ToolStripMenuItem.Name = "帮助ToolStripMenuItem";
                this.帮助ToolStripMenuItem.Size = new System.Drawing.Size(44, 21);
                this.帮助ToolStripMenuItem.Text = "帮助";
                // 
                // 关于ToolStripMenuItem
                // 
                this.关于ToolStripMenuItem.Name = "关于ToolStripMenuItem";
                this.关于ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
                this.关于ToolStripMenuItem.Text = "关于...";
                // 
                // 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(101, 48);
                // 
                // 复制ToolStripMenuItem
                // 
                this.复制ToolStripMenuItem.Name = "复制ToolStripMenuItem";
                this.复制ToolStripMenuItem.Size = new System.Drawing.Size(100, 22);
                this.复制ToolStripMenuItem.Text = "复制";
                // 
                // 粘贴ToolStripMenuItem
                // 
                this.粘贴ToolStripMenuItem.Name = "粘贴ToolStripMenuItem";
                this.粘贴ToolStripMenuItem.Size = new System.Drawing.Size(100, 22);
                this.粘贴ToolStripMenuItem.Text = "粘贴";
                // 
                // textBox1
                // 
                this.textBox1.ContextMenuStrip = this.contextMenuStrip1;
                this.textBox1.Location = new System.Drawing.Point(12, 51);
                this.textBox1.Multiline = true;
                this.textBox1.Name = "textBox1";
                this.textBox1.Size = new System.Drawing.Size(257, 162);
                this.textBox1.TabIndex = 2;
                // 
                // toolStrip1
                // 
                this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
                this.toolStripButton1,
                this.toolStripSeparator2,
                this.toolStripButton2,
                this.toolStripButton3,
                this.toolStripSeparator3,
                this.toolStripButton4,
                this.toolStripSeparator4,
                this.toolStripDropDownButton1,
                this.toolStripButton5});
                this.toolStrip1.Location = new System.Drawing.Point(0, 25);
                this.toolStrip1.Name = "toolStrip1";
                this.toolStrip1.Size = new System.Drawing.Size(281, 25);
                this.toolStrip1.TabIndex = 3;
                this.toolStrip1.Text = "toolStrip1";
                // 
                // toolStripButton1
                // 
                this.toolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
                this.toolStripButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image")));
                this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
                this.toolStripButton1.Name = "toolStripButton1";
                this.toolStripButton1.Size = new System.Drawing.Size(36, 22);
                this.toolStripButton1.Text = "退出";
                // 
                // toolStripSeparator2
                // 
                this.toolStripSeparator2.Name = "toolStripSeparator2";
                this.toolStripSeparator2.Size = new System.Drawing.Size(6, 25);
                // 
                // toolStripButton2
                // 
                this.toolStripButton2.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
                this.toolStripButton2.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton2.Image")));
                this.toolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta;
                this.toolStripButton2.Name = "toolStripButton2";
                this.toolStripButton2.Size = new System.Drawing.Size(36, 22);
                this.toolStripButton2.Text = "复制";
                // 
                // toolStripButton3
                // 
                this.toolStripButton3.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
                this.toolStripButton3.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton3.Image")));
                this.toolStripButton3.ImageTransparentColor = System.Drawing.Color.Magenta;
                this.toolStripButton3.Name = "toolStripButton3";
                this.toolStripButton3.Size = new System.Drawing.Size(36, 22);
                this.toolStripButton3.Text = "粘贴";
                // 
                // toolStripSeparator3
                // 
                this.toolStripSeparator3.Name = "toolStripSeparator3";
                this.toolStripSeparator3.Size = new System.Drawing.Size(6, 25);
                // 
                // toolStripButton4
                // 
                this.toolStripButton4.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
                this.toolStripButton4.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton4.Image")));
                this.toolStripButton4.ImageTransparentColor = System.Drawing.Color.Magenta;
                this.toolStripButton4.Name = "toolStripButton4";
                this.toolStripButton4.Size = new System.Drawing.Size(36, 22);
                this.toolStripButton4.Text = "关于";
                // 
                // toolStripSeparator4
                // 
                this.toolStripSeparator4.Name = "toolStripSeparator4";
                this.toolStripSeparator4.Size = new System.Drawing.Size(6, 25);
                // 
                // toolStripDropDownButton1
                // 
                this.toolStripDropDownButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
                this.toolStripDropDownButton1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
                this.功能1ToolStripMenuItem,
                this.功能2ToolStripMenuItem});
                this.toolStripDropDownButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripDropDownButton1.Image")));
                this.toolStripDropDownButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
                this.toolStripDropDownButton1.Name = "toolStripDropDownButton1";
                this.toolStripDropDownButton1.Size = new System.Drawing.Size(45, 22);
                this.toolStripDropDownButton1.Text = "更多";
                // 
                // 功能1ToolStripMenuItem
                // 
                this.功能1ToolStripMenuItem.Name = "功能1ToolStripMenuItem";
                this.功能1ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
                this.功能1ToolStripMenuItem.Text = "功能1";
                // 
                // 功能2ToolStripMenuItem
                // 
                this.功能2ToolStripMenuItem.Name = "功能2ToolStripMenuItem";
                this.功能2ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
                this.功能2ToolStripMenuItem.Text = "功能2";
                // 
                // statusStrip1
                // 
                this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
                this.toolStripStatusLabel1,
                this.toolStripProgressBar1,
                this.toolStripStatusLabel2});
                this.statusStrip1.Location = new System.Drawing.Point(0, 224);
                this.statusStrip1.Name = "statusStrip1";
                this.statusStrip1.Size = new System.Drawing.Size(281, 22);
                this.statusStrip1.TabIndex = 4;
                this.statusStrip1.Text = "statusStrip1";
                // 
                // toolStripStatusLabel1
                // 
                this.toolStripStatusLabel1.BorderStyle = System.Windows.Forms.Border3DStyle.RaisedInner;
                this.toolStripStatusLabel1.Name = "toolStripStatusLabel1";
                this.toolStripStatusLabel1.Size = new System.Drawing.Size(53, 17);
                this.toolStripStatusLabel1.Text = "运行中...";
                // 
                // toolStripProgressBar1
                // 
                this.toolStripProgressBar1.Name = "toolStripProgressBar1";
                this.toolStripProgressBar1.Size = new System.Drawing.Size(150, 16);
                this.toolStripProgressBar1.Value = 50;
                // 
                // toolStripButton5
                // 
                this.toolStripButton5.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
                this.toolStripButton5.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton5.Image")));
                this.toolStripButton5.ImageTransparentColor = System.Drawing.Color.Magenta;
                this.toolStripButton5.Name = "toolStripButton5";
                this.toolStripButton5.Size = new System.Drawing.Size(23, 22);
                this.toolStripButton5.Text = "toolStripButton5";
                // 
                // toolStripStatusLabel2
                // 
                this.toolStripStatusLabel2.Name = "toolStripStatusLabel2";
                this.toolStripStatusLabel2.Size = new System.Drawing.Size(131, 17);
                this.toolStripStatusLabel2.Text = "toolStripStatusLabel2";
                // 
                // Form1
                // 
                this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
                this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
                this.ClientSize = new System.Drawing.Size(281, 246);
                this.Controls.Add(this.textBox1);
                this.Controls.Add(this.toolStrip1);
                this.Controls.Add(this.menuStrip1);
                this.Controls.Add(this.statusStrip1);
                this.MainMenuStrip = this.menuStrip1;
                this.Name = "Form1";
                this.Text = "菜单实例";
                this.menuStrip1.ResumeLayout(false);
                this.menuStrip1.PerformLayout();
                this.contextMenuStrip1.ResumeLayout(false);
                this.toolStrip1.ResumeLayout(false);
                this.toolStrip1.PerformLayout();
                this.statusStrip1.ResumeLayout(false);
                this.statusStrip1.PerformLayout();
                this.ResumeLayout(false);
                this.PerformLayout();
    
            }
    
            #endregion
    
            private System.Windows.Forms.MenuStrip menuStrip1;
            private System.Windows.Forms.ToolStripMenuItem 系统ToolStripMenuItem;
            private System.Windows.Forms.ToolStripMenuItem 设置ToolStripMenuItem;
            private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
            private System.Windows.Forms.ToolStripMenuItem 退出ToolStripMenuItem;
            private System.Windows.Forms.ToolStripMenuItem 帮助ToolStripMenuItem;
            private System.Windows.Forms.ToolStripMenuItem 关于ToolStripMenuItem;
            private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
            private System.Windows.Forms.ToolStripMenuItem 复制ToolStripMenuItem;
            private System.Windows.Forms.ToolStripMenuItem 粘贴ToolStripMenuItem;
            private System.Windows.Forms.TextBox textBox1;
            private System.Windows.Forms.ToolStrip toolStrip1;
            private System.Windows.Forms.ToolStripButton toolStripButton1;
            private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
            private System.Windows.Forms.ToolStripButton toolStripButton2;
            private System.Windows.Forms.ToolStripButton toolStripButton3;
            private System.Windows.Forms.ToolStripSeparator toolStripSeparator3;
            private System.Windows.Forms.ToolStripButton toolStripButton4;
            private System.Windows.Forms.ToolStripSeparator toolStripSeparator4;
            private System.Windows.Forms.ToolStripDropDownButton toolStripDropDownButton1;
            private System.Windows.Forms.ToolStripMenuItem 功能1ToolStripMenuItem;
            private System.Windows.Forms.ToolStripMenuItem 功能2ToolStripMenuItem;
            private System.Windows.Forms.StatusStrip statusStrip1;
            private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel1;
            private System.Windows.Forms.ToolStripProgressBar toolStripProgressBar1;
            private System.Windows.Forms.ToolStripButton toolStripButton5;
            private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel2;
        }
    }
    
    
    展开全文
  • 因为最近做一个项目,在网上收集了一些有用的东西,自己的测试了,借花献佛。...迅雷5界面代码 360安全卫士界面代码 非规则窗体界面代码 IrisSkin2&Skins 破解版DLL + 60个皮肤 SkinManager[bin+src]

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 81,357
精华内容 32,542
关键字:

c#界面设计

c# 订阅