C# 窗体简介
2017-02-05 09:06
239 查看
窗体简介
C#窗体编辑界面(VS2010)
其中主要包括工具箱、资源管理器、属性和用于显示和编辑的部分(如果没有的话可以在视图菜单中调整)
资源管理器中:
1、其中Form1.cs中包括一些窗体的设计
2、Program.cs中是窗体的主函数
程序是从main中开始的,C#窗体不例外:using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace window_Text
{
static class Program
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
}
上面是Program.cs中的代码,其中using System.Windows.Forms;是一个命名空间,如果要做窗体必须要用这个命名空间
上面的Application.Run(new Form1());这句话的意思是运行窗体程序
C#窗体编辑界面(VS2010)
其中主要包括工具箱、资源管理器、属性和用于显示和编辑的部分(如果没有的话可以在视图菜单中调整)
资源管理器中:
1、其中Form1.cs中包括一些窗体的设计
2、Program.cs中是窗体的主函数
程序是从main中开始的,C#窗体不例外:using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace window_Text
{
static class Program
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
}
上面是Program.cs中的代码,其中using System.Windows.Forms;是一个命名空间,如果要做窗体必须要用这个命名空间
上面的Application.Run(new Form1());这句话的意思是运行窗体程序
相关文章推荐
- C#窗体控件简介-文本框控件TextBox
- C#窗体控件简介-选项卡控件
- C#窗体控件简介_1
- C#窗体控件简介-进度条控件
- C#窗体控件简介ListBox
- 【C#基础】之WinForm窗体常用控件的属性、方法及事件简介 .
- C#窗体控件简介ListBox(需整理)
- 【C#基础】之WinForm窗体常用控件的属性、方法及事件简介
- 【C#基础】之WinForm窗体常用控件的属性、方法及事件简介
- C#窗体控件简介-选项卡控件
- C#窗体控件简介_2
- C#窗体控件简介ListBox
- C#窗体控件简介_2
- C#窗体控件简介_1
- C#窗体控件简介ListBox(需整理)
- 【C#基础】之WinForm窗体常用控件的属性、方法及事件简介
- C#简介- 类和对象,选自《C#编程语言详解》,送给新手
- C#程序设计语言Version2.0简介
- 如何使用 C# .NET 在 ASP.NET 应用程序中实现基于窗体的身份验证
- C#程序设计语言Version2.0简介(zz)