a simple calculator vb vb.net the IF command

DON'T post new tutorials here! Please use the "Pending Submissions" board so the staff can review them first.
Post Reply
bubzuru
.net coder
.net coder
Posts: 700
Joined: 17 Apr 2007, 16:00
17
Contact:

a simple calculator vb vb.net the IF command

Post by bubzuru »

just look at the pics 8O if u still dont get it pm me
the lines in green are the ones you read :D

part 1: the UI
add 3 textboxes 1 button and 1 label

Image

part 2: the code
add this code under the button click event

Image

why arnt the pics workin :?

ebrizzlez
Kage
Kage
Posts: 732
Joined: 31 Mar 2007, 16:00
17
Location: Hidden in a Buffer Protection.
Contact:

Post by ebrizzlez »

It would be nice for a written tutorial rather then just the source. Cause maybe you forgot, but some people dont know what the hell VB IS!

But nice work... :wink:

I know Vb myself, but I am saying for the other users out there who dont know VB... They wont be able to understand anything by just looking at a pic.
[img]http://i81.photobucket.com/albums/j205/ebrizzlez/4lsint1.jpg[/img]

SkaB0t
Newbie
Newbie
Posts: 4
Joined: 02 Jul 2007, 16:00
16

Post by SkaB0t »

you couldve used elseif statements instead of all those if..thens. or you can even use a select...case.

ebrizzlez
Kage
Kage
Posts: 732
Joined: 31 Mar 2007, 16:00
17
Location: Hidden in a Buffer Protection.
Contact:

Post by ebrizzlez »

SkaB0t wrote:you couldve used elseif statements instead of all those if..thens. or you can even use a select...case.
Thats what's so unique about coding.. each programmer has their own unique style...

If he used the elseif commands he could have still used the select case commands or the if's as he had done... so their isnt just one way to doing it. And each author of a program has their own style in programming... Personally I would have done the same exact way as he did.. But thats just me... :wink:
[img]http://i81.photobucket.com/albums/j205/ebrizzlez/4lsint1.jpg[/img]

SkaB0t
Newbie
Newbie
Posts: 4
Joined: 02 Jul 2007, 16:00
16

Post by SkaB0t »

i agree, but some styles of programing are more efficient/process faster/easier to read. to me, an elseif statement would be easier to read and follow then a few if..thens. but whatevs.

User avatar
Nerdz
The Architect
The Architect
Posts: 1127
Joined: 15 Jun 2005, 16:00
18
Location: #db_error in: select usr.location from sucko_member where usr.id=63;
Contact:

Post by Nerdz »

I don't think using if or select is a style.... is more habit of experienced user... imo
Give a man a fish, you feed him for one day.
Learn a man to fish, you feed him for life.

bubzuru
.net coder
.net coder
Posts: 700
Joined: 17 Apr 2007, 16:00
17
Contact:

Post by bubzuru »

i did it useing just IF because its alot more simple to look at like

if this
do that

not to confuse it more to the complete noobz :lol:

Post Reply