Any VB.Net programmers around?

Status
Not open for further replies.

tonyp56

SatelliteGuys Pro
Original poster
Supporting Founder
May 13, 2004
799
0
Tulsa, Oklahoma, United States
Took an introduction to Visual Basic 2005 course for my Bachelor degree. And after the course was over tried to stay with it, however, the lack of knowing enough about programming and therefore the ability to program real well, caused me to give up on it for now. However, am very interested in programming (my Bachelor is a Computer Information Systems (B.S. in C.I.S) degree) and would like to learn more.

I've still got Programming in Visual Basic, Programming in C/C++, and Programming in Java to take (taking all that is available on programming). I know from reading around that C++ is the hardest and best programming language to learn (and closely related/similar to Java and C#). However, for now, I am interested in Visual Basic because that is what I know the best (not much, but more than I know about C#, Java, and C++).

Anyways, anyone know of a good project to write, so I can learn the most? I tried some open source Solitaire source code written in VB.net, and it looked like Greek to me, LOL... So will have to start even below that...
 
I don't know of any projects off hand but when I took VB.Net we used Microsoft's VB.Net Step by Step book. It did a lot of hand holding in the beginning and worked you up to some advanced topics later in the book. Also after every chapter there were projects to do. The projects could be challenging but I learned a lot doing them. The big thing is stick with it and don't get discouraged. I use C# now but it's not that much different from VB so if you get stuck feel free to PM me and I will be happy to help.

Good Luck
 
There's no easy projects to write or follow.. code samples work best..

My favorite test for VB.NET developers to see how their mind thinks and how well they know the language is to ask them to write a simple Replace function (obviously without using the internal replace method)..

It's interesting the things people come up with..

For the most part with software development it isn't always what you know but how well you can deal with the issues you come up against... Knowing one langague (ANSI C was my first langague) made it very easy for me to move into VB, C++, VB.NET, C#, etc..

The way you program (breaking functions up, using interfaces, recursion, etc) will actually pass through from language to language.. where as knowing System.IO.File.Exists will only help you in .NET languages.. :)

A book would be a good place to start because it will keep things small.. if you want to start on programs think of useful apps you could write for yourself.. like a calculator.. then move into learning something else like file access.. etc..
 
I seem to change languages as often as I change my socks.

The only way to learn the first language is to have an objective. The books are good, but a class is better. I wouldn't worry too much about vb.net vs VB2003 or VB6. They are pretty much the same for what you want to do, and for most programming, actually.

A solitaire program is actually pretty complex. I would use something like that for a final exam on an intermediate course. For a first assignment, I would generally give the students a three part progtram.

Part one: Display "Hello World" in a dialog box. I would give them all the steps (search "Hello World" on the microsoft sites listed above).

Part two: When you click OK on the dialog box, bring up a second dialog box. The second dialog box should have OK and cancel buttons. If you press OK, it goes back to the Hello World dialog. If you press cancel, the program exits.

Part three: Add a counter to display in each dialog box that shows how many times each dialog box has appeared.

The dialog boxes are an important part of VB programming. The counter will let you discover how to place something in the background.
 
Interesting, however, I must say I've already had the book and the course... We did simple programs like Copyright screens, math program so that it would randomly give different numbers to add or subtract for kids to learn math... The assignments were sometimes partially completed programs that I had to go in and add/fix, other times I had to create program from scratch, including designing interface to writting code... However, nothing too complex... (financial calculator, program to keep track of inventory, etc...)

One of the final programs that I had to do was a lottery number generator, (generate 5 unique random numbers between 1 and 55) I took that and created a program on my own that allows you to randomly generate numbers for the PowerBall (5 balls 1-55 and 1 ball 1-42) and Hot Lotto (5 Balls 1-39 and 1 ball 1-19). You open my Lotto generator, and via radio button select which game you want to generate numbers for. I also attached an about.box to this, so you can select my "About" button and it display's a copyright... I am very proud of this program, even though it is pretty simple... However, lost interest when I could not go any further (only so many things you can generate random unique numbers for LOL). Here is the main part of code for this program:

Code:
[SIZE=2][COLOR=#0000ff]Private[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Sub[/COLOR][/SIZE][SIZE=2] xdisplayButton_Click([/SIZE][SIZE=2][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=2] sender [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] System.Object, [/SIZE][SIZE=2][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=2] e [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] System.EventArgs) [/SIZE][SIZE=2][COLOR=#0000ff]Handles[/COLOR][/SIZE][SIZE=2] xdisplayButton.Click
[/SIZE][SIZE=2][COLOR=#008000]' declare array and other variables
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] lottoNumbers(4) [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Integer
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] counter [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Integer[/COLOR][/SIZE][SIZE=2] = 0
[/SIZE][SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] number [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Integer
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] powerBall [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Integer
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] HotBall [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Integer
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] randomGenerator [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] Random
[/SIZE][SIZE=2][COLOR=#008000]' clear labels
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].xlabelOne.Text = [/SIZE][SIZE=2][COLOR=#a31515]""
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].xlabelTwo.Text = [/SIZE][SIZE=2][COLOR=#a31515]""
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].xlabelThree.Text = [/SIZE][SIZE=2][COLOR=#a31515]""
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].xlabelFour.Text = [/SIZE][SIZE=2][COLOR=#a31515]""
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].xlabelFive.Text = [/SIZE][SIZE=2][COLOR=#a31515]""
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].xlabelSix.Text = [/SIZE][SIZE=2][COLOR=#a31515]""
[/COLOR][/SIZE][SIZE=2][COLOR=#008000]' randomly select 5 unique random numbers from array for white balls
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].xPowerBall.Checked [/SIZE][SIZE=2][COLOR=#0000ff]Then
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Do[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]While[/COLOR][/SIZE][SIZE=2] counter < 5
number = randomGenerator.Next(1, 56)
[/SIZE][SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE][SIZE=2] Array.IndexOf(lottoNumbers, number) = -1 [/SIZE][SIZE=2][COLOR=#0000ff]Then
[/COLOR][/SIZE][SIZE=2]lottoNumbers(counter) = number
counter += 1
[/SIZE][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]If
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Loop
[/COLOR][/SIZE][SIZE=2]powerBall = randomGenerator.Next(1, 43)
[/SIZE][SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE][SIZE=2] Array.IndexOf(lottoNumbers, powerBall) = -1 [/SIZE][SIZE=2][COLOR=#0000ff]Then
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].xlabelSix.Text = [/SIZE][SIZE=2][COLOR=#0000ff]CStr[/COLOR][/SIZE][SIZE=2](powerBall)
[/SIZE][SIZE=2][COLOR=#0000ff]Else
[/COLOR][/SIZE][SIZE=2]powerBall = randomGenerator.Next(1, 43)
[/SIZE][SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].xlabelSix.Text = [/SIZE][SIZE=2][COLOR=#0000ff]CStr[/COLOR][/SIZE][SIZE=2](powerBall)
[/SIZE][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]If
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]ElseIf[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].xHotLotto.Checked [/SIZE][SIZE=2][COLOR=#0000ff]Then
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Do[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]While[/COLOR][/SIZE][SIZE=2] counter < 5
number = randomGenerator.Next(1, 40)
[/SIZE][SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE][SIZE=2] Array.IndexOf(lottoNumbers, number) = -1 [/SIZE][SIZE=2][COLOR=#0000ff]Then
[/COLOR][/SIZE][SIZE=2]lottoNumbers(counter) = number
counter += 1
[/SIZE][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]If
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Loop
[/COLOR][/SIZE][SIZE=2]HotBall = randomGenerator.Next(1, 20)
[/SIZE][SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE][SIZE=2] Array.IndexOf(lottoNumbers, HotBall) = -1 [/SIZE][SIZE=2][COLOR=#0000ff]Then
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].xlabelSix.Text = [/SIZE][SIZE=2][COLOR=#0000ff]CStr[/COLOR][/SIZE][SIZE=2](HotBall)
[/SIZE][SIZE=2][COLOR=#0000ff]Else
[/COLOR][/SIZE][SIZE=2]HotBall = randomGenerator.Next(1, 20)
[/SIZE][SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].xlabelSix.Text = [/SIZE][SIZE=2][COLOR=#0000ff]CStr[/COLOR][/SIZE][SIZE=2](HotBall)
[/SIZE][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]If
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]If
[/COLOR][/SIZE][SIZE=2][COLOR=#008000]' display lottery numbers in label box
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].xlabelOne.Text &= lottoNumbers(0)
[/SIZE][SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].xlabelTwo.Text &= lottoNumbers(1)
[/SIZE][SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].xlabelThree.Text &= lottoNumbers(2)
[/SIZE][SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].xlabelFour.Text &= lottoNumbers(3)
[/SIZE][SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].xlabelFive.Text &= lottoNumbers(4)
[/SIZE][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Sub
[/COLOR][/SIZE]

I also downloaded VS 2008 (C#, C++, and Visual Basic 2008 Express editions) the book that I had used the 2005 version of Visual Basic only...
 
I have a BS and an MS in Computer Science. They made us take assembly language as our first programming language. It was their way of weeding out the weaker students. You'd be surprised how much code it takes to write a text-based interactive scientific calculator in assembly.

Then we got to move up to fortran, then C, then C++. I think there was a little pascal and cobol in there too, just for kicks. Oh, and we had to learn ADA.

We didn't do any visual anything or windows programming of any type. The earth was still cooling back then.

I still 90% of my coding in C. The rest in assembly. But then again, I mostly write device drivers for embedded controllers.
 
Status
Not open for further replies.

Seeking Ideas

Satellite Equipment Question

Users Who Are Viewing This Thread (Total: 0, Members: 0, Guests: 0)

Who Read This Thread (Total Members: 1)