perito Posted December 25, 2007 Posted December 25, 2007 well Ive been programming VB6 for a long time and now I bought Visual Studio 2008 and I want to start programming in VB.NET I have different questions: 1) VB6 needed runtimes files to be able to run on PCs without Visual Basics (if the program had winsock or inet.....), does VB.NET Need runtime files on XP, Vista? Where can i get them? 2) Does VB.NET have winsock? where can I learn how to use it? Or what is its replacement? 3) Is there any tut that helps me convert (my syntax writing) from VB6 to VB.NET 4)How to exit/close my program in VB.NET (application.exit????) or is there any better way (in VB6 Unload Form1) Quote
Administrators PlausiblyDamp Posted December 26, 2007 Administrators Posted December 26, 2007 1 - All .net applications require the .net runtime to be installed, IIRC windows 2003 comes with 1.1 as does SP2 for XP. Vista ships with version 3. If the users are installing updates via windows update then they will probably have the framework installed. 2 - For networking the framework provides the System.Net and System.Net.Sockets namespaces - each with a lot of classes to handle various network related functionality. There are various examples on these forums or on MSDN itself about how to use the classes, or if you have specific questions just ask ;) 3 - Converting VB6 to .Net is a bit of a pain and the conversion wizard that ships with visual studio is next to useless; unfortunately it is pretty much learning a new language and framework :( http://www.xtremedotnettalk.com/showthread.php?t=48270 is worth a glance as it does highlight some of the more obvious changes. 4 - A .net application should exit when the last thread (of running form) is closed, although Application.Exit works it has 'issues' regarding clean-up code etc. not being run and is something I would personally avoid using. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Leaders snarfblam Posted December 27, 2007 Leaders Posted December 27, 2007 To elaborate on number 4, a normal Windows application will have a main form. When this main form is closed the application will terminate. Application.Exit() is not a preferred way to end an application (just as using an End command is not the preferred way to end a VB6 application). I would say the closest VB.NET equivalent to Unload Form1 would be Me.Close() inside Form1's code (you could also use Form1.Close() if you are using magic instances). Quote [sIGPIC]e[/sIGPIC]
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.