How can I run another application or batch file from my Visual Basic .NET code?

Posted by: Duncan Mackenzie, MSDNThis post applies to Visual Basic .NET 2002/2003 Suppose you want to run a command line application, open up another Windows program, or even bring up the default web browser or email program… how can you do this from your VB code? The answer for all of these examples is the same,…

15

How do I determine the difference between two dates?

Posted by: Duncan Mackenzie, MSDNThis post applies to Visual Basic .NET 2002/2003 This common question is often phrased as “How do I find the number of hours between two dates?”, substituting minutes, seconds, days, or whatever interval you are looking for in the place of ‘hours’. Well, in Visual Basic .NET there are two main ways…

12

Multicolumn Combobox?

Posted by: Phil Weber, VB MVPThis post applies to Visual Basic .NET 2002/2003 I see from our referrer logs that many people are coming here seeking information on multicolumn combo boxes (thanks to Ian’s question). Here’s the scoop… No, the .NET Framework does not include a multi-column combobox (alternate spelling to help Googlers find us!),…

8

Can I run Visual Basic 6.0 and Visual Basic .NET on the same machine?

Posted by: Duncan Mackenzie, MSDNThis post applies to Visual Basic .NET 2002/2003 and Visual Basic 6.0 J. Henshaw asks “Is it possible to run both VB6 and VB.Net on the same machine,or do I have to remove VB6 to be able to use VB.NET”, and the answer is a definite yes. You can run them…

6

Does the .NET Framework include an equivalent for [Insert Win32 API function here]?

Posted by: Phil Weber, VB MVPThis post applies to Visual Basic .NET 2002/2003/2005Judging by the questions I see in online discussion forums, many VB developers are not yet aware of this article, which lists Win32 API functions and their .NET equivalents: http://msdn.microsoft.com/library/en-us/dndotnet/html/win32map.asp

2

Workaround: Arrays with non-zero lower bounds

Posted by: Phil Weber, VB MVPThis post applies to Visual Basic .NET 2002/2003/2005 OK, now that Paul Vick has explained why VB.NET doesn’t support arrays with non-zero lower bounds, let’s see how we can do them anyway. 😉 Say you want to store a collection of annual values in an array of integers. It’s reasonable…

3

Why doesn’t VB support non-zero lower bounds for arrays?

Posted by: Duncan Mackenzie, MSDNThis post applies to Visual Basic .NET 2002/2003/2005 Another answer from Paul Vick, Technical Lead on VB.NET, explaining the changes in array bounds from Visual Basic 6.0: Why doesn’t VB support non-zero lower bounds for arrays? … We allowed programmers to declare arrays that had bounds from 1 to 20, or…

1

Why did Visual Basic .NET introduce AndAlso and OrElse?

Posted by: Duncan Mackenzie, MSDNThis post applies to Visual Basic .NET 2002/2003/2005 Paul Vick, Technical Lead on VB.NET, and the author of the Visual Basic .NET Language Specification, discusses the new short-circuiting boolean operators added in Visual Basic .NET 2002. Why did we introduce AndAlso and OrElse? … Prior to VB.NET, the VB language only…

0

XML Documentation?

Posted by: Phil Weber, VB MVPThis post applies to Visual Basic .NET 2002/2003/2005 Ali Parvaresh asks: How can I document VB.NET source codes like what you do for C#? This is another feature scheduled for Visual Basic .NET 2005 (ref http://panopticoncentral.net/archive/2003/11/08/239.aspx). In the meantime, however, there are a number of third-party tools which add this…

3

Operator Overloading?

Posted by: Phil Weber, VB MVPThis post applies to Visual Basic .NET 2005 (“Whidbey”) Gokhan Altinoren asks: What was the design decision behind the fact that VB.NET does not support operator overloading? Will this feature be in the VB.NET specification in the future? Sadly, the VB team failed to consult me while they were designing…

3