简体   繁体   English

visual basic和vb.net

[英]visual basic and vb.net

I was a moderately successful VB6 programmer (by that I mean nothing really complicated, just fairly simple apps for my own use). 我是一个中等成功的VB6程序员(我的意思是没有什么真正复杂的,只是我自己使用的相当简单的应用程序)。 I am trying to "migrate" myself to Visual Studio 2010 (specifically VB). 我试图将自己“迁移”到Visual Studio 2010(特别是VB)。 Oh my gosh, it's changed! 哦,天哪,它改变了! Having had no experience with the interim versions, I feel like I am in way over my head. 在没有临时版本的经验的情况下,我觉得我已经超越了我的头脑。

One thing that I don't really understand is the relationship between a Visual Basic standalone application (ie, an app that runs on a computer, not on web pages, which is what I have always developed), and a vb.net application. 我不太了解的一件事是Visual Basic独立应用程序(即在计算机上运行的应用程序,而不是在我自己开发的网页上运行的应用程序)和vb.net应用程序之间的关系。 When I use the Visual Studio help functions for specific classes some of the pages say they are for .net features. 当我对特定类使用Visual Studio帮助函数时,一些页面说它们用于.net功能。 How can I translate that to just a standalone app? 我怎样才能将其翻译成一个独立的应用程序?

I am specifically wanting to create a simple app to capture and display incoming TCP packets from an iPhone app I am developing. 我特别想要创建一个简单的应用程序来捕获和显示我正在开发的iPhone应用程序的传入TCP数据包。 That means I need to understand sockets better. 这意味着我需要更好地理解套接字。 It was fairly simple in VB6 (I've done it before), but I really need to do it in 2010. 它在VB6中相当简单(之前我已经完成了),但我确实需要在2010年完成它。

My apologies for my stupidity. 我为我的愚蠢道歉。 At 58 years old, my mind just doesn't capture new concepts like it used to, especially at the rate at which they speed past. 在58岁的时候,我的思绪并没有像过去那样捕捉新的概念,特别是在它们超速的速度。

Bill, 法案,

A typical VB6 standalone application would map to a VB.NET WinForms application, and once you get to that point the coding differences you'll come across will highlight how much better the object orientation of the .NET world is than VB6 - you'll get true implementation inheritance, all/most of the other goodies of OO. 典型的VB6独立应用程序将映射到VB.NET WinForms应用程序,一旦你到达那一点,你将遇到的编码差异将突出显示.NET世界的面向对象比VB6好多少 - 你会获得真正的实现继承,OO的所有/大多数其他好东西。 Moreover, it will still seem pretty familiar with some syntax and conceptual differences. 此外,它似乎仍然熟悉一些语法和概念上的差异。 The nice part is that you still write event handlers, but the encapsulation of logic and scoping leads to much better apps IMHO. 好的部分是你仍然编写事件处理程序,但逻辑和范围的封装导致更好的应用程序恕我直言。

One additional kind of app you can develop is a console app, which is essentially just a character-mode interface window that I had wished I could make a thousand times over back in the VB6 world. 您可以开发的另一种应用程序是一个控制台应用程序,它本质上只是一个字符模式界面窗口,我希望我可以在VB6世界中做出一千次。 The majority of quick test/concept apps I put together are simple console apps (although mostly in C# these days). 我放在一起的大多数快速测试/概念应用程序都是简单的控制台应用程序(尽管现在主要是在C#中)。

Web applications are the ones that become web pages, and have a front-end "markup" page with HTML and a "code-behind" page that gives you access to all the ASP.NET plumbing. Web应用程序是成为Web页面的应用程序,并且具有带HTML的前端“标记”页面和“代码隐藏”页面,使您可以访问所有ASP.NET管道。 No matter how complicated the app, its all a variation on a simple round-trip theme between a client browser and a web server that handles the requests, and affords the opportunity to contact external sources (such as database servers, external data feeds, etc) to make a web app more than just static content. 无论应用程序有多复杂,它都是客户端浏览器和处理请求的Web服务器之间简单的往返主题的变体,并提供联系外部源(如数据库服务器,外部数据源等)的机会。 )使Web应用程序不仅仅是静态内容。

In your packet example, .NET wraps an entire library of abstraction around sockets and network programming, so you should actually find that aspect of it (perhaps much) simpler than the VB6 world. 在您的数据包示例中,.NET围绕套接字和网络编程包装整个抽象库,因此您实际上应该发现它的某个方面(可能更多)比VB6世界更简单。

There are several other project types, but that basic outline should give you a shove in the right direction. 还有其他几种项目类型,但是这个基本大纲应该会给你一个正确的方向。 You're NOT stupid, you're just adapting the best you can! 你不是傻瓜,你只是在尽力而为! I empathize with your learning-curve plight...just a few years behind you :) 我同情你的学习曲线困境......仅仅几年后你:)

Blessings! 祝福!

The .Net part is just the framework that the new languages use - it doesn't mean it is specific to web development. .Net部分只是新语言使用的框架 - 它并不意味着它特定于Web开发。

To summarise: 总结一下:

.Net = the base framework (think old style dlls). .Net =基础框架(想想旧式dlls)。

VB.Net = The programming language. VB.Net =编程语言。

Winforms = The part of the framework that supports desktop applications. Winforms =支持桌面应用程序的框架部分。 ASP.NET = The part of the framework that supports web/server applications. ASP.NET =支持Web /服务器应用程序的框架部分。

Silly naming I agree. 傻傻的命名我同意。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM