Visual Studio, Visual Basic - Currency Converter Part 1 of 2

Visual Studio, Visual Basic - Currency Converter Part 1 of 2


This tutorial will show you how to create a currency converter the easy way. It covers downloading website contents (from XE) and using regular expression to match the rates.

Closed Caption:

hi welcome to this first tutorial on
visual basic basically could use any
visual basic you on time using visual
basic 2010
I got it from my previous job so I'm
going to lucky but you can actually
download even the free version so i just
start the visual studio
we're going to create the visual basic
project so just click type the new
project will have a basically a list
visual basic is going to be windows form
application click OK and it's using the
net framework for . out
shouldn't be a problem so let's just
create the look first of the form that
just call it a cab
ok the former school 30 properties will
call it
currency converter and with a couple of
things we might want to do is the the
buttons that there are the minimize the
the minimize the maximize button you
just want to remove them
so the minimize is going to be set false
the maximize box we don't need this
false
so you just only have the exit button so
now we have this here let's add the
stuff you click on the tool box here we
have the let's make this larger toolbox
we will need the first thing we will
need is a
the labels couple labels first one to
just call this
let's go here we call it
this currency can converter
now I this will be in the metal center
let's give a what we're not going to
worry about the looks here okay let's
just do the this one here just for the
sake of simplicity
so let's just say convert from we need
convert to and then we just click
convert which is the amount and then we
need to have another label
well it's going to basically be the
actual this label be a label we used to
show the results
so this is going to be our let's call it
convert to label and then we have a
textbox let's just body text box here we
have here this one is going to actually
have the currency amount so it's going
to be currency amount and then we have
another text box will basically has the
result and this we will call it
main text easier to remember
so now we need the list the list box
we have the list box here is basically
will have a list box of all the
currencies like currency from i already
have the list from the job application
we developed so I'm just going to copy
it and click edit items and just put the
items here
these are just the list of the
currencies
let's copy yet
and we're going to have the name convert
to now we have almost everything we have
here but one thing i want to do is on
the actually we need the button to
actually do the convert we just going to
call it convert convert convert button
and which is gonna text it convert now
let's go let's go to the action of the
button to click ok here's the thing
couple of things we need to do is have
to import so this is basically the
general
we're going to have the imports which
basically the first one is the system I
oh that one we can use for the system
that I oh that's for the reading and
then we need one for the regular
expression so we have the imports system
that tax that regular expressions
now we have this class main we have this
thing here to avoid any mistake
let's go to the form and let's go to the
the actual here not click will go to the
we need to go to the load function will
see where is this basically when where
it loads the we're not going to go to
convert button which is go to form and
we look for the
load it doesn't have it would just worry
about that later
let's just go to the button
basically the button will just check
first check if the currency is a number
F statement not is numeric we just use
the built-in function and the we do the
currency amount that text of the numeric
we'll just do a message box message box
and then we'll just say please enter a
valid amount of this box this is duty
information and invalid and put for the
title
let's set the focus to the text box and
return
I keep adding the semicolon
ok now if everything is ok let's do the
calculate cow
q late function now the calculator
function will just do it here and the
private sub do calculate now
basically we need the following four
screaming with them
string as sisters drink a system that I
or that stream
we need the string read as a system that
i owe that stream reader
these are variables we need for the
actually reading the website now let's
get the values from the text boxes
that's a them a string from as string we
need is an array and then we're going to
split the currency currency from text
and then we split it with this here
the same thing we do for the the two
array and it's going to be as string and
we're going to split the currency to
that text
ok
ok currency from its not declared for
some reason
let's just see from I i misspelled it
it's ice-cold it only with one he will
take its ok i have to go and fix it now
the web pitching variables
these are the actual variables now we
need for the pitching them request as a
system that net that web request system
that net web we request and we create a
new system that net that not that
what request that create and we create
the actual URL
now for here unlike the java application
we're going to actually use a the
XE that's a web-sight actually does the
same thing that currency converter so
basically here we're going to have the
string amount and then we're going to
add it
you go to their website you can actually
view the URL that you need to use
I'm just copying and pasting from there
this TR - okay and the other stuff
ok str2 and then we have str from okay
just okay
we have the str amount we have the from
it's actually going to be the str from
subscript 1 + and - it's going to have
the string to subscript 1 which actually
has the code subscript 0 has the
currency name
we don't need the name we just need the
code and then the final just copied from
the URL
ok ok now
the URL is done now the URL is done we
will just have to go and do this thing
here the actual response system that
Network response and is going to be the
response of the actual here now we'll
just have to match the response that we
got basically realize / expression we
have the try catch and the try
let's make the my matches as match
collection
this is the regular expression now we
actually have to my regular x6
explosions to this expression as new
projects and then basically the
expression that we need to match is 0 to
90 or more numbers a decimal zero or
more numbers and has to have the actual
code
here so basically this is that and then
we have the my matches my right
expression that matches and the str read
that read to end now
search for all the words and the string
we have up there
okay it says currency to currency from
currency
- it's not there

Video Length: 14:12
Uploaded By: Aziz Saleh
Published: 11/25/2010
View Count: 51,989

Related Software Products
Easy Currency Converter
Easy Currency Converter

Published By:
Ashkon Technology LLC

Description:
Easy Currency Converter is a simple currency calculator. It converts about 200 world currencies including Euro and updates exchange rates with a single button click. Cross- currency calculations are based on US Dollar local currency exchange rate.


Related Videos
Currency Converter 3.0.0 for Android
Currency Converter 3.0.0 for Android

Video Length: 01:13
Uploaded By: Rudo Halmi (1/5/2015)
View Count: 73,719

Java Netbeans - Currency Converter Part 1 of 3
Java Netbeans - Currency Converter Part 1 of 3

Video Length: 14:45
Uploaded By: Aziz Saleh (11/25/2010)
View Count: 18,285

Android App: Easy Global Currency Converter (Money Exchange)
Android App: Easy Global Currency Converter (Money Exchange)

Video Length: 01:11
Uploaded By: Gao Shiyu (1/18/2013)
View Count: 17,700

Visual Studio, Visual Basic - Currency Converter Part 2 of 2
Visual Studio, Visual Basic - Currency Converter Part 2 of 2

Video Length: 06:55
Uploaded By: Aziz Saleh
View Count: 11,118

How to convert currency using Google
How to convert currency using Google

Video Length: 01:50
Uploaded By: butterscotchcom
View Count: 8,730

Best Currency Converter
Best Currency Converter

Video Length: 03:38
Uploaded By: ForexConspiracy (5/25/2011)
View Count: 6,844

Visual Studio 2012 Project How to Create Currency Converter in CSharp
Visual Studio 2012 Project How to Create Currency Converter in CSharp

Video Length: 19:21
Uploaded By: C# Software GUI (1/1/2016)
View Count: 5,990

Java Netbeans - Currency Converter Part 2 of 3
Java Netbeans - Currency Converter Part 2 of 3

Video Length: 13:59
Uploaded By: Aziz Saleh
View Count: 5,090

Free and easy to use iPhone currency exchange converter App.
Free and easy to use iPhone currency exchange converter App.

Video Length: 02:57
Uploaded By: sergiopa2002 (11/24/2013)
View Count: 4,282

Java Netbeans - Currency Converter Part 3 of 3
Java Netbeans - Currency Converter Part 3 of 3

Video Length: 05:06
Uploaded By: Aziz Saleh
View Count: 4,079

Copyright © 2026, Ivertech. All rights reserved.