Go Back   PCMech Forums > Help & Discussion > Software Discussion & Support

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 09-16-2007, 08:27 AM   #1
Member (8 bit)
 
Join Date: Oct 2006
Location: North Devon, England
Posts: 148
Send a message via MSN to RowanSpry
Help me with VB 2005!

I started a Computing course at college this week, in which we use Microsoft Visual Basic 2003.

I couldnt get hold of that edition, so i got hold of the 2006 edition instead...

So im trying out all the different bits of code i wrote in class this week, onthe computers at school (which all worked FINE then)..but on this newer version it doesnt work.

For example, One of the things i wrote was the following (very basic currency converter) based on a template given by the teacher.

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)

Dim Pound, Dollars As double

Pound = InputBox ("Please enter amount of GB Sterling")
Dollar = Pound * 1.8

Print Dollar

End sub


On this newer version of Visual Basic it wont run, with an error message about debugging, and something about the Outputpath and AssemblyName...

Also it doesnt recognise the word "Print"

Any chance you guys can help?

RowanSpry is offline   Reply With Quote
Old 09-17-2007, 12:47 PM   #2
Come in Ray...
 
faulkner132's Avatar
 
Join Date: Sep 2004
Posts: 1,668
This code was written for VB (circa the year 2000) and is long since removed in favor of .NET.

Basically, this is what the code needs to be for .NET 2.0 (Visual Basic 2005):
Code:
Private Sub Form1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseDown

   Dim dblPound as Double = InputBox("Please enter amount of GB Sterling")
   Dim dblDollars as Double = Pound * 1.8

   Me.lblConverted.Text = dblDollars

   'For pretty format, uncomment the line below
   'Me.lblConverted.Text = "$" & Format(dblDollars,"#,##0.00")

End Sub
You will need to add a Label to the form called "lblConverted" and then this will work.
faulkner132 is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Norton 2005 OR 2007 - System usage? craige_4u Networking & Online Security 2 12-29-2006 10:23 AM
Help please, im new, and need someone to look this over sephroth_r1 Networking & Online Security 2 11-19-2005 11:23 AM
Confused Siberian Bear Distributed Computing 15 06-16-2005 06:42 AM
File System infected by Narrator Spyware/Adware Moonkif Networking & Online Security 8 04-22-2005 02:06 AM
McAfee Internet Security 2005, or Norton 2005? Mrguy123 Software Discussion & Support 5 11-20-2004 07:44 PM


All times are GMT -5. The time now is 12:17 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2