C#界面设计之窗体绘制
2016-04-06 12:41
651 查看
先上运行结果啦!
解决方案管理图:
主要代码如下:
不积跬步,无以至千里,加油!
解决方案管理图:
主要代码如下:
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#调用COM组件
- Patrol 7 架构下?的处理方法
- 中病毒后常用的解决方法病毒终极解决方案
- C#实现把指定数据写入串口
- C#动态创建button的方法
- C#中抽象方法与虚拟方法的区别
- c#中虚函数的相关使用方法
- C#实现给图片加水印的方法
- C#使用加边法计算行列式的值
- C#实现多线程的同步方法实例分析
- C#中尾递归的使用、优化及编译器优化
- C#中的delegate委托类型基本学习教程
- C#实现子窗体与父窗体通信方法实例总结
- C#通用邮件发送类分享
- 举例讲解C#中自动实现的属性
- C#中this的用法集锦
- C#数据结构之顺序表(SeqList)实例详解
- C#.NET获取拨号连接的宽带连接方法
- C#异步绑定数据实现方法
- C#实现AddRange为数组添加多个元素的方法