locked
what is vb & vb.net RRS feed

  • Question

  •  

    hello friends

     

    may i known the diffrence between vb and vb.net ?

     

    and why we call it vb.net?

     

     

    Regard's

    Jin Katama

    Tuesday, November 6, 2007 11:29 AM

Answers

  • They are completly different, little explaination:

    VB.Net (or VB7.0) is not an upgrade to VB 6.0; it is a completely new language written from the ground up to be compatible with Microsofts "dotnet" Common Language Runtime. The legacy VB language was used as a general guide for syntax but backwards compatibility was sacrificed at so many points that there is little code that can be directly ported. If you are looking at VB.Net as a potential upgrade path for current applications or as a tool for current developers to move into and then learn new features you are probably going to have significant problems. The Visual Basic 6.0 runtime is great at simplifying many of the common programming tasks. But having this simplifying layer has meant that you cant use a new operating system feature, such as DirectX, until there is a Visual Basic-accessible wrapper around it. As a Visual Basic developer, the most important benefit you get from the .NET Framework is direct and easy access to the underlying .NET platform using a consistent programming model. This means you can build applications with Visual Basic.NET that were not easy or not possible to build with Visual Basic 6.0. As a Visual Basic 6.0 developer, you will appreciate now having access to the same features and capabilities as other platform languages. For example, to create a Windows Service, you no longer have to write it in Visual C++, nor will you have to resort to hacks or kludges. You can do it all elegantly, cleanly, and easily using Visual Basic.NET. To give you some examples of what you can do with the .NET Framework, lets discuss four common tasks that you might need to perform in your applications: tracing and event logging, multithreading, file system monitoring, and creating Windows Services. Tracing and Event Logging When building a robust application, you must pay careful attention to diagnostics and troubleshooting mechanisms. Typically, this involves writing a tracing component, which handles opening the output destination (event log or file), writing the trace message, and closing the output destination. You then call methods on this component throughout your code, passing it the text to log. You invest all this time and effort to build a tracing and logging subsystem, which ultimately does not contribute to solving the business problem but is required to build the application. The .NET Framework includes classes and other data types that make it easy to log trace messages by providing the logging infrastructure for you. Multithreaded Applications One of the great features of the .NET Framework is the ability to create multithreaded applications in Visual Basic without having to use third-party tools or unsupported Visual Basic tricks. The .NET Frameworks multithreading support is provided by classes and interfaces in the System.Threading namespace, so all .NET languages can create and manipulate threads in the same way. System.Threading.Thread is the core class and provides support for creating and controlling threads. To create a thread, you create a new System.Threading.Thread object that passes the constructor a ThreadStart delegate. This delegate represents the method where the thread will begin its execution. When youre ready to start the new thread, you call Thread.Start() (see Listing 1). As you start to build multithreaded applications, youll quickly realize the need to control access to shared resources, such as shared class variables. The .NET Framework also includes several classes and data types that you can use to synchronize actions performed by two threads. File System Monitoring Ive come across a few applications that are required to wait and process files that show up in a particular directory—for example, an application that imports data from a file into a database. Data files may be downloaded from a mainframe or otherwise transferred into an input directory, from which the application imports them into a database. Instead of constantly polling the directory for new files, you can wait for notifications indicating that a new file has been created. You can do this in Visual Basic 6.0 by using Win32 APIs, and you can do it in Visual Basic.NET by using the .NET Framework classes. However, implementation in .NET is more consistent with the way you do everything else in .NET, so the learning curve is minimal. Creating Windows Services When you want to create a Windows Service, you must use Visual C++ or resort to using srvany.exe or third-party tools to create the service in Visual Basic. Either way, you are not writing your service natively in Visual Basic, and you are adding more dependencies outside the Visual Basic runtime. If you write a Windows Service from scratch using C++ or C (without using the Active Template Library), youll have to write quite a bit of code to coordinate communication back and forth between your service and the Service Control Manager (SCM), which handles starting, pausing, continuing, and stopping services. The .NET Framework makes it easy to implement a service by providing the System.ServiceProcess.ServiceBase class. To write a service, you inherit from this class, override some of its methods, set its properties, and youre ready to go!
    Tuesday, November 6, 2007 11:38 AM
  • Generally, VB means those versions before VB6.0(containing VB6.0). VB.NET means these versions after VB6.0.

     

    Here is the hiberarchy:
    VB5.0 -> VB6.0 -> VB .Net 2002 (VB 7.0) -> VB .Net 2003 (VB 7.1) -> VB .Net 2005 (VB 8.0) -> VB .Net 2008 (VB 9.0)

    "why we call it vb.net?"

    Every version of Visual Basic since VB6.0 is under the .Net platform using .NET Framework.

    Every version of Visual Basic since VB6.0 is shipped with Visual Studio .NET tool.

     

     

    Regards,

    Martin

    Thursday, November 8, 2007 9:45 AM

All replies

  • They are completly different, little explaination:

    VB.Net (or VB7.0) is not an upgrade to VB 6.0; it is a completely new language written from the ground up to be compatible with Microsofts "dotnet" Common Language Runtime. The legacy VB language was used as a general guide for syntax but backwards compatibility was sacrificed at so many points that there is little code that can be directly ported. If you are looking at VB.Net as a potential upgrade path for current applications or as a tool for current developers to move into and then learn new features you are probably going to have significant problems. The Visual Basic 6.0 runtime is great at simplifying many of the common programming tasks. But having this simplifying layer has meant that you cant use a new operating system feature, such as DirectX, until there is a Visual Basic-accessible wrapper around it. As a Visual Basic developer, the most important benefit you get from the .NET Framework is direct and easy access to the underlying .NET platform using a consistent programming model. This means you can build applications with Visual Basic.NET that were not easy or not possible to build with Visual Basic 6.0. As a Visual Basic 6.0 developer, you will appreciate now having access to the same features and capabilities as other platform languages. For example, to create a Windows Service, you no longer have to write it in Visual C++, nor will you have to resort to hacks or kludges. You can do it all elegantly, cleanly, and easily using Visual Basic.NET. To give you some examples of what you can do with the .NET Framework, lets discuss four common tasks that you might need to perform in your applications: tracing and event logging, multithreading, file system monitoring, and creating Windows Services. Tracing and Event Logging When building a robust application, you must pay careful attention to diagnostics and troubleshooting mechanisms. Typically, this involves writing a tracing component, which handles opening the output destination (event log or file), writing the trace message, and closing the output destination. You then call methods on this component throughout your code, passing it the text to log. You invest all this time and effort to build a tracing and logging subsystem, which ultimately does not contribute to solving the business problem but is required to build the application. The .NET Framework includes classes and other data types that make it easy to log trace messages by providing the logging infrastructure for you. Multithreaded Applications One of the great features of the .NET Framework is the ability to create multithreaded applications in Visual Basic without having to use third-party tools or unsupported Visual Basic tricks. The .NET Frameworks multithreading support is provided by classes and interfaces in the System.Threading namespace, so all .NET languages can create and manipulate threads in the same way. System.Threading.Thread is the core class and provides support for creating and controlling threads. To create a thread, you create a new System.Threading.Thread object that passes the constructor a ThreadStart delegate. This delegate represents the method where the thread will begin its execution. When youre ready to start the new thread, you call Thread.Start() (see Listing 1). As you start to build multithreaded applications, youll quickly realize the need to control access to shared resources, such as shared class variables. The .NET Framework also includes several classes and data types that you can use to synchronize actions performed by two threads. File System Monitoring Ive come across a few applications that are required to wait and process files that show up in a particular directory—for example, an application that imports data from a file into a database. Data files may be downloaded from a mainframe or otherwise transferred into an input directory, from which the application imports them into a database. Instead of constantly polling the directory for new files, you can wait for notifications indicating that a new file has been created. You can do this in Visual Basic 6.0 by using Win32 APIs, and you can do it in Visual Basic.NET by using the .NET Framework classes. However, implementation in .NET is more consistent with the way you do everything else in .NET, so the learning curve is minimal. Creating Windows Services When you want to create a Windows Service, you must use Visual C++ or resort to using srvany.exe or third-party tools to create the service in Visual Basic. Either way, you are not writing your service natively in Visual Basic, and you are adding more dependencies outside the Visual Basic runtime. If you write a Windows Service from scratch using C++ or C (without using the Active Template Library), youll have to write quite a bit of code to coordinate communication back and forth between your service and the Service Control Manager (SCM), which handles starting, pausing, continuing, and stopping services. The .NET Framework makes it easy to implement a service by providing the System.ServiceProcess.ServiceBase class. To write a service, you inherit from this class, override some of its methods, set its properties, and youre ready to go!
    Tuesday, November 6, 2007 11:38 AM
  •  

    tell me what it is
    Tuesday, November 6, 2007 1:42 PM
  • Generally, VB means those versions before VB6.0(containing VB6.0). VB.NET means these versions after VB6.0.

     

    Here is the hiberarchy:
    VB5.0 -> VB6.0 -> VB .Net 2002 (VB 7.0) -> VB .Net 2003 (VB 7.1) -> VB .Net 2005 (VB 8.0) -> VB .Net 2008 (VB 9.0)

    "why we call it vb.net?"

    Every version of Visual Basic since VB6.0 is under the .Net platform using .NET Framework.

    Every version of Visual Basic since VB6.0 is shipped with Visual Studio .NET tool.

     

     

    Regards,

    Martin

    Thursday, November 8, 2007 9:45 AM