窗体?对,现在总算开始有点像在看VB的文章了。不过我要说:大虾请重新来过。我们把Visual Studio.net自动生成的代码丢一边去,从零开始。其实到现在为止我一直都在用SnippetCompiler来写代码。干脆打开WindowsForm.vb好了。首先是导入必要的命名空间:imports Systemimports System.Drawingimports Microsoft.VisualBasicimports System.Collectionsimports System.ComponentModelimports System.Windows.Forms然后要定义主窗体。主窗体是一个类,从System.Windows.Forms.Form中继承:public class WindowsForm : inherits System.Windows.Forms.Form public sub New() end sub end class然后是main函数:public module MyModule sub Main() Application.Run(new WindowsForm()) end subend module运行Debug菜单中的Start as WinForm,一个简单的窗体就出现了:但是这个窗体太简单。to be continued...
Copyright @ 2007-2012 敏韬网(敏而好学,文韬武略--MinTao.Net)(学习笔记) Inc All Rights Reserved. 闵涛 E_mail:admin@mintao.net(欢迎提供学习资源)
鄂公网安备 42011102001154号
站长:MinTao ICP备案号:鄂ICP备11006601号-18