|
打开VS 2005 ,文件->新建项目(CTRL+SHIFT+N)->

确定,即可进入到CS(设计界面),然后点左边的工具箱,放入按钮组件(Button)

选中这个button,看右边的属性对话框。name为按钮名称(与按钮上显示的文本是不同概念)

找到Test属性,输入Hello,World

双击button1,输入代码:
MessageBox.Show("hello,world") ;
MessageBox是一个类,不详讲解,大概了解下他的功能就是显示一个信息对话框。
输入代码后完整代码应该是这样的:
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms;
namespace HelloWord { public partial class Form1 : Form { public Form1() { InitializeComponent(); }
private void button1_Click(object sender, EVEntArgs e) { MessageBox.Show("hello,world") ; } } }
按下F5运行,即可看到效果!
下载免费游戏更新软件
关键字:系列入门教程
 |
相关文章 |
|
|
|