Visual basic

Soldato
Joined
30 Dec 2004
Posts
4,681
Location
Bromley, Kent
I'm trying to get into this and try and learn some of the basics, as I have a feeling it might be handy for this in the future with my job. Now I have had a look around but I haven't found that much.

Are there any releases publicly available from Microsoft of this and if so can somebody supply a link, and maybe to some tutorials for basics?

Thanks

- Pea0n
 
Learn either VB.NET or C# - pick which has the syntax you think you'll get along with easiest. Feature wise, both languages are practically identical, being able to access the same features in the .NET framework. You should be able to switch between them fairly easy once you're up and running, so just pick whichever has the syntax you prefer the look of. :)

Edit : When you say Visual Basic, do you mean Visual Basic .NET, or Visual Basic (VBA) for coding within Excel/Access?
 
Last edited:
OK so VB.net, assuming I start with that, I can code with it in VB 2008 Express? For the record I certainly don't intend to make a career of it, but I have a feeling at least the ability to understand the code and make an adaptation of others code may help me in the future, thats all I really want to get out of it.

Cheers so far, anything else on the VB.net looks handy :)

- Pea0n

Edit: No not web development. Mainly minor applications and scripting, certainly nothing that complicated by any stretch of the imagination.

To answer Sloth - I was intending to make scripts etc. that can partially integrate with MS products, i.e. login scripts for users, automated things to assist with system administration etc. I was only assuming VBA, but i'm very new to all this so any pointers in a better direction would be appreciated
 
Last edited:
OK so VB.net, assuming I start with that, I can code with it in VB 2008 Express?

Yep :). According to Wiki according to Microsoft:

The idea of express editions, according to Microsoft, is to provide streamlined, easy-to-use and easy-to-learn IDEs for less serious users, such as hobbyists and students

If I were you I'd grab the off-line installer from the site I linked you to instead of the web one.
 
Aye I was just wondering as I have started to program a calculator in it at the moment (and I am surprised I actually have some functionality out of it). Got some of it working, so I guess this is actually in VB.net and not just VB, so Im getting confused? IIRC its using .net 3.5, that's right? if so I guess continuing to learn like this would be recommended?

- Pea0n
 
It's VB.NET; it shares similar syntax to VB but effectively they're two separate languages.

Unless you want to write cross-platform (in which case you would have to use another language such as C++) I don't see any reason not to use .NET, it's a great framework.
 
Last edited:
Thanks for that Pho, sounds good to me. For the foreseeable future I can only see this being used with MS systems so no Novell or *nix. Do you have any links to tutorials for basic things to get me used to it or any recommended reading (paper back or digital)?

Currently I am working on a calculator, using the tutorial I have built it to work with addition, but now i am trying to modify that to get multiplication, division and subtraction working :)

- Pea0n
 
Thanks for that Pho, sounds good to me. For the foreseeable future I can only see this being used with MS systems so no Novell or *nix. Do you have any links to tutorials for basic things to get me used to it or any recommended reading (paper back or digital)?

Currently I am working on a calculator, using the tutorial I have built it to work with addition, but now i am trying to modify that to get multiplication, division and subtraction working :)

- Pea0n

Without trying to sound sarcastic, whenever I need help I just tend to Google for it, or look at the MSDN documentation. There's so much information out there now so it's easy to find. I don't know of any books, I actually could do with getting myself a decent reference as well.

I do recommend you look at C# as well though, personally I find it easier to read than VB.NET and it seems more popular in businesses and there also seems to be more help online for it.

I.e. (ignore bad programming here) C#:
PHP:
bool bContinue = true;
while (bContinue == true)
{
	for (int j = sFileName.Length - 1; j >= 0; j--)
	{
		// break if we encounted a \
		if (sFileName[j] == '\\')
		{
			bContinue = false;
			break;
		}

		newName = sFileName[j] + newName;
	}
}

VB.NET:
PHP:
Dim bContinue As Boolean = True
While bContinue = True
    For j As Integer = sFileName.Length - 1 To 0 Step -1
        ' break if we encounted a \
        If sFileName(j) = "\"c Then
            bContinue = False
            Exit For
        End If
        
        newName = sFileName(j) + newName
    Next
End While


This may be useful for your calculator :).
 
Question - why is it handy to learn for your job?

'Might' be handy. A lot of our clients use scripts and in some cases small apps. they have made, or old support staff have, so far I haven't had much to do with them, but I intend to where possible. From what I have seen of them they appear mostly to be in VB.net, or as I thought VB. It also seems to be reasonably basic and transferable between systems and therefore clients, and reasonably popular.

I didn't intend to learn it with any kind of heavy use in mind, more of something to start with as it appears to be widely supported and seems to be a simple way to learn 'good practice'. If there's a better recommended way-in then I'd be happy to hear an opinion and consider it.

@ Pho - Yeah I have been Googling for a few hours, although ironically because there is so much I have found, it is kind of overpowering in knowing what to read and what to skip until I am better at it. Cheers for the link though also.

Several people have mentioned C#. I haven't really done much yet, literally just doing a Hello World app and modifying that, and this calculator and modifying this too a little. Would you all recommend ditching VB.net and just going with C#? If so I would guess MS have a developer application like VB 2008 Express to download?

Cheers so far guys

- Pea0n

Edit - Found the C# developer kit
 
I would stick with VB.net to begin with, I think as it is more verbose than C# it is easier to see what's going on. I say the best way to learn is "real life app" so find out as much as you can about the potential apps and systems you are interested in, and maybe ask people if you can have a look at some of their scripts. Then you can break the script down by asking about it in forums.

I would also in tandem think about taking a basic approach and looking at early VB and Classic ASP examples before going onto VB.net, which is designed for the web and therefore can be a bit more difficult to learn the very basics from.

Rgds
 
In a lot of ways it's down to personal preference; with .NET all languages will compile into the same code (so there's no argument of C# being faster than VB.NET etc). However, C# shares similar syntax to C++, PHP and Java so if you want to learn those at a later date you will find it much easier :).
 
Thanks for the info on that. Installing the C# developer kit at the moment, I'll take a look at both. Trouble is there's so much going on with several potential places to start it is a little over whelming.

- Pea0n
 
In a lot of ways it's down to personal preference; with .NET all languages will compile into the same code (so there's no argument of C# being faster than VB.NET etc). However, C# shares similar syntax to C++, PHP and Java so if you want to learn those at a later date you will find it much easier :).

Aha. Handy to know. I think I will take closer look at C# due to the syntax similarities. Would it be worth purchasing any literature for reference, or just stick with web-based info?

- Pea0n
 
I'd go with C <sharp> (can't find the right key as I'm on a US spec MacBook Pro!)

C encourages better programming practice. VB is easy to learn for beginners but encourages bad habits and outputs code that's hard to read. It's fine if it's your own code but someone else's can be difficult to get your head around. Have a quick look at Pho's simple example above. I find the C example a lot easier to read and understand than the VB.

I've got a degree in Computer Science so I've done my fair share of programming. Maybe I'm just coming at the discussion from the opposite end...
 
I'd go with C <sharp> (can't find the right key as I'm on a US spec MacBook Pro!)

My sympathies :P

Yeah I think form a personal POV, I hate learning one thing, to re-learn something else, and I hate things that are deemed as messy. C# it is then for the time being.

- Pea0n
 
Back
Top Bottom