|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Member (8 bit)
|
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? |
|
|
|
|
|
#2 |
|
Come in Ray...
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
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
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 |