Post: Visual Basic Coding Thread {N00BS LOOK HERE} console application
06-03-2012, 09:41 PM #1
gt0409
Banned
(adsbygoogle = window.adsbygoogle || []).push({}); Hey Guys

If You Guys Can Donate So i Can Get 40,000 Vbux To Change My Username I Would Really Appreciate It Thanks!!!

Back with an ultimate VB Tutorial for n00bs and some good program you can make. Here We have a console application

go onto your visual basic startpage and click new project.
click console application.

we need to display something on the console, the command for this is console.writeline("Hello World")
this will display Hello World and be waiting to enter text on the next line
to write on the same line you just writeline ("Console.write("Hello World")

this will quickly flash up Hello World and then close the console, to keep it open always write console.readline at the end of your program the program will then end after the enter key is pressed

Now We can get the user to enter a word so we must create a variable, a variable is a group in which we can store data

there are several types of variable :

integer - number (76,97,362)
single - number with decimal (3.67, 7.97)
string - any character or number/letter on the keyboard
while not all these are the most used

to create a variable we must assign it a type and a name we do this is 'dimming'

so to create a variable of someone's name we must write the following code :

    dim yourname as string


you have now created your first variable.

now we must assign the input to the variable

so lets create the program written above
    
dim yourname as string

console.writeline("Please Enter Your Name")
yourname = console.readline

console.readline

this program will then give the variable 'yourname' the data that you have entered

to display this data you simply write:
    
dim yourname as string

console.writeline("please enter your name")
yourname = console.readline

console.writeline("your name is " & yourname)
console.readline

this is the result :

You must login or register to view this content.

congratulations you have just written your first console program. this thread will be updated tommorow with more tutorials so keep looking at it !

See you guys later

GT

[multipage=(Display) ]

So im back with another tutorial this time creating displays with visual basic!

so open up a new console application and we'll begin!

now everyone knows foreground is what is immediately in front of you and background is well whats is the background

so foreground is the obvious choice when picking to color text. so lets begin, using a diplay name program we are going to display your username 5 times.

so lets start writing the code :
     dim myname as string
myname = "GT0409"


this is writing data to a variable like we did last tutorial now for the color command

    Console.ForegroundColor =
we then must assign a color to it like so :
    ConsoleColor.Cyan
this can be any color within reason so just replace cyan with red or green

so now lets display our name 5 times

    
Dim myname As String

myname = "GT0409"

Console.ForegroundColor = ConsoleColor.Cyan
Console.WriteLine(myname)

Console.ForegroundColor = ConsoleColor.Red
Console.WriteLine(myname)

Console.ForegroundColor = ConsoleColor.Green
Console.WriteLine(myname)

Console.ForegroundColor = ConsoleColor.White
Console.WriteLine(myname)

Console.ForegroundColor = ConsoleColor.Yellow
Console.WriteLine(myname)

Console.ReadLine()

and don forget the ever-most important readline! so this is what the result should be !
You must login or register to view this content.

[multipage=(Our First Useful Program) ]
Tutorial 3 is our first useful program is a BMI calculator, in case you don't know what BMI is its a measurement used for how healthy someone is BMI stands for Body Mass Index and can be gained by dividing someone's weight in kilometres by there height in meters(squared).

now this is really throwing you n00bs in at the deep end but i belive you guys should be able to follow so lets start

first we will need 3 variables
height - a single as there height is probably not going to be just 2 or 1
weight - also a single as there weight is probably going to have a decimal place in
sum - also a single as there total BMI is most likely to have decimal places.

so lets firs create the variables :
    
dim height as single
dim weight as single
dim sum as single


no we must create a line to get the user to enter there height in meters and their weight in kilo's
     
console.writeline("please enter your weight in kilo's")
weight = console.readline
console.writeline("Please Enter your height in meters")
height = console.readline

now we must must create the BMI figure using the sum variable
so
i will using a picture for this one as it is easier for you to understand.
You must login or register to view this content.

so now we have created the code lets test it

here are some test data you can use :

81kg
1.92m
BMI = 22.0

50kg
1.75m
BMI = 16.4



so for the first set of test data we should be 22.0 lets have a look :

You must login or register to view this content.

we have got a really long deicmal number that is accurate but aslo right, lets move onto the next tutorial to see how
[multipage=(Formatting)]

Formatting is when we assign a number a certain number of decimal places or give a a format to follow so with our pervious code of BMI calculator we got a weird 21.97353 number when what we wanted was 22.0 to round up or down to a decimal place we need formatting

so lets import our previous code :
    Dim sum As Single
Dim height As Single
Dim weight As Single

Console.WriteLine("Please Enter Your Weight")
weight = Console.ReadLine
Console.WriteLine("Please Enter Your Height")
height = Console.ReadLine

sum = weight / height ^ 2
Console.WriteLine("Your BMI Is " & sum)
Console.ReadLine()


so now we need to format sum so lets go ahead and create a new variable that is still a single called final

lets now do the formatting

the command for formatting is you guessed it format, now to format we just need to assign the newly formatted variable to final
so we use the command :
    final = Format(sum, 0.0)
so lets go through that 'final=' assigning format command, 'Format' command word to format, '(sum,' showing what to format and finally '0.0)' showing to format it to one decimal place.

so using our new-found formatting skills lets have a look at the result :
You must login or register to view this content.
whats this? it still hasnt changed thats bcecuase we have forgotten to change the output of
    console.writeline("Your BMI is " & sum)
to
    console.writeline("Your BMI is " & final) 
!!

now lets have a look :
You must login or register to view this content.

Now your done! carry on to the next tutorial or look over this one to make sure you remeber it!

[multipage=(The IF Statement)]

So now we are going to learn about the IF statement, to learn the IF statement all you really need is logic so if you dont have logic switch off your PC and go and get a job right now. so in very professional terms a basic IF statement would be :
    IF santa = true then children = happy ELSE  children = unhappy


so you have the IF, then the operator then the statement that changes the outcome.

so lets design a program to allow a user to login
we will need several variable to be able to verifiable , NOTE : at the end of every IF statement you need an ELSE or and END IF.
so let create some variables:
    
dim password as string

then lets ask the user to login
    
console.writeline("Please Enter Your Password")
password = console.readline

then we will begin the verifacation begins what will do is match the user input to our defined password
    
IF password = "entry" then console.writeline("You Have Logged In") ELSE console.writeline("Password Incorrect")


so lets put that all together and see the results
CODE:
    
dim password as string
console.writeline("please enter your password")
password = console.readline
IF password = "entry" then console.writeline("You Have Logged In") ELSE console.writeline("Password Incorrect")
console.readline

RESULTS :
You must login or register to view this content.
You must login or register to view this content.

[multipage=(Variable Arrays)]
an array is where you can assign several bits of data to the same variable, you do this by creating a variable as you normally would but after the name you put however many parts you want the variable to be split into in brackets for example :
     dim mylittlearray(6) as string

this will mean your variable has 6 possible places for data.
so say we wanted to create a program to search through a arrray list we woud have to create the following variables.
    
dim numberlist(5) as integer
dim search as string
dim index as integer


now i will explain the last two the search is what teh user will search for, the index is a counter, evreytime the data is not found it moves it along so for example :

search = 3 and numberlist(3) = 3 however the program will start the search at numberlist(1) and so index = index + 1 will move the search long to numberlist(2) and then (3) whre it will be found so lets take a look at this code for a saerching program

You must login or register to view this content.
that picture should explain everything! i hope you enjoyed my tutorials may release more later! i will add some challenges for you guys and some programs you can create

Love You Guys ! :love:

GT

[multipage=(CHALLENGES)]
BMI Calculator

Create a BMI calculator by letting the user enter their height in m and weight in kilos
(BMI is calculated by dividing the weight by the height squared)
Extensions
create menu system that allows people to enter there height in foot,inches
say that there are underweight if their BMI is under 18.5
say that they are normal if their BMI is between 18.5 and 24.9
say that they are overweight if their BMI is 25 to 29.9
say that they are obese if their BMI is over 30


Calculator

ask the user to enter 1 number then a action and then a second number
add then then display the result
Extension
ask them how many numbers they want to add so they can add three or more numbers.


[multipage=(PDF libary of computing help)]
don't go giving these out as im not supposed to be giving these to you.

You must login or register to view this content.

You must login or register to view this content.

You must login or register to view this content.

You must login or register to view this content.

You must login or register to view this content.

You must login or register to view this content.

You must login or register to view this content.

You must login or register to view this content.

Put the rest in here :

You must login or register to view this content.

You must login or register to view this content.

You must login or register to view this content.

You must login or register to view this content.

You must login or register to view this content.

You must login or register to view this content.

You must login or register to view this content.

You must login or register to view this content.

You must login or register to view this content.

You must login or register to view this content.



[multipage=(advanced login system)]
ok im guna just write the code for this one

    
Dim passwords(5) As String
Dim login As String
Dim index As Integer
Dim entry As Boolean



entry = False
passwords(1) = "password"
passwords(2) = "entry"
passwords(3) = "access"
passwords(4) = "allow"
passwords(5) = "admin"



Console.WriteLine("please Enter Your password")
login = Console.ReadLine

Do
If login = passwords(index) Then entry = True Else index = index + 1
Loop Until index = 5 Or entry = True

If entry = True Then Console.WriteLine("You Have Logged in")
If entry = False Then Console.WriteLine("Wrong Password")


Console.ReadLine()


[multipage=(Social Engineering Program For Sale!)]

Hey guys

got a social engineering program for sale and can also sell courses on how to make your own ad make them look believably and professional.

social engineering is where victim is tricked intpo thinking he is the hacker and using a hacking program for lets say Call Of Duty 6 For PS3, we now set up a program to make the User have to connect to his PSN account full with email, password, and even a port for realism. he then enters his details like the little hax0r he is and as soon as he clicks that button, all his details will be sent to you through a gmail account.

simple? the design part is the code part not so much so, so for a small fee of 100vbux - 150vbux i will make a program customised to your guys needs.

my courses will also teach you how to make one and sell it off as a real program.

GT out
(adsbygoogle = window.adsbygoogle || []).push({});
06-10-2012, 11:05 AM #11
gt0409
Banned
updated will sell programs for vbux

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo