Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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). I am trying to "migrate" myself to Visual Studio 2010 (specifically 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 (i.e., an app that runs on a computer, not on web pages, which is what I have always developed), and a vb.net application. When I use the Visual Studio help functions for specific classes some of the pages say they are for .net features. 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. 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.

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.

like image 849
Bill Norman Avatar asked Jul 18 '12 16:07

Bill Norman


People also ask

Is Visual Basic and VB.NET same?

VB.NET is an object-oriented programming language. Visual Basic is Event Driven programming language. VB.NET supports IntelliSense compatibility. It does not supports IntelliSense compatibility.

What is the difference between VB and basic?

Visual Basic (VB) is a similar language (also created by Microsoft), with the main difference being that VB programs can be run outside of Microsoft applications. Basic is a language created in 1964. There are many implementations of it. Built in to Windows are Visual Basic .

Is VB.NET similar to VBA?

No, the only similarity between VBA and VB.NET is the similar-looking syntax. VBA is similar to Visual Basic 6, which is obsolete since about 1997 (?), so VBA is not a very modern language. VB.NET is a modern language, having the same capabilities as C#, but the syntax is terrible, so I personally prefer C#.


2 Answers

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. 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. The majority of quick test/concept apps I put together are simple console apps (although mostly in C# these days).

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. 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.

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.

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!

like image 154
David W Avatar answered Oct 08 '22 05:10

David W


The .Net part is just the framework that the new languages use - it doesn't mean it is specific to web development.

To summarise:

.Net = the base framework (think old style dlls).

VB.Net = The programming language.

Winforms = The part of the framework that supports desktop applications. ASP.NET = The part of the framework that supports web/server applications.

Silly naming I agree.

like image 31
Martin Avatar answered Oct 08 '22 04:10

Martin