Is anyone good at Visual Basic? - U2 Feedback

Go Back   U2 Feedback > Lypton Village > Lemonade Stand > Lemonade Stand Archive
Click Here to Login
Thread Tools Search this Thread Display Modes
Old 06-10-2002, 12:38 PM   #1
The Fly
u2elevatejo's Avatar
Join Date: May 2002
Location: UK
Posts: 110
Local Time: 10:51 AM
Is anyone good at Visual Basic?

.. because I'm not and I'm worried I'm going to fail my course on some crusty programming that I can't do.

Heeelllpp meeeeee!

lol - STRESS!!

I need to make a conversion program which can convert bi-directionally (whatever that means).

What I have to convert:

Fahrenheit to Celsius
Feet to Metres
Gallons to Litres

I'm also crap at maths. We only get our programming lesson once a week for an hour and a half. We've had 4 weeks to learn how to use visual basics and we're suddenly expected to write our own program! Now I've missed the lesson to do with Pascal (screams) so God knows how I'm going to pass the course.

I took Multimedia not programming!!!! Narghhhh!!


u2elevatejo is offline  
Old 06-10-2002, 01:33 PM   #2
Rock n' Roll Doggie
BEAL's Avatar
Join Date: Sep 2000
Location: San Diego
Posts: 4,021
Local Time: 10:51 AM
I dont have enough time to really help you.....but from my experience with programming classes like that(especially my VB class) usually a project that is given is discussed in the book somewhere(if you have one).

To be quick cause I'm at work.....What I would do first is go over any chapters you may have talked about in class. 95% of the time in my education there were a lot of "clues" on how to figure a program out just by skimming through a chapter or two. it won't give you the full answer(though it may...), but it will give you enough of a idea to get started.

If I were anywhere else but work, I'd let you email me the project so I could help more....


BEAL is offline  
Old 06-10-2002, 01:52 PM   #3
Rock n' Roll Doggie
oliveu2cm's Avatar
Join Date: Jun 2001
Location: Live from Boston
Posts: 8,334
Local Time: 06:51 AM
It's your lucky day- I majored in CS. I can help you out a little- what language are you writing in, C or C++? or Pascal? I studied Pascal but that was in high school. if you post all the info here i'll see what I can assist you with. But off the top of my head you will want to do something like this:

have an IF statement based on a user input to see what they want to convert. For instance, ask them what they want to convert, enter T for temperature, W for weight, S for size (or something like that) and store that in a variable. if variable = T then you want to convert from Farenheit to Celc. I need more info- like do they enter in the temperature? you'll need another promopt after that- it's actually a hard problem for students who aren't very familiar with the language- my frist problem was something like, make a program that prints out your name!

anyway let me know how I can help. a good idea is to write out what the problem wants to do step by step in English and then figure out how to translate each step to cs language
oliveu2cm is offline  
Old 06-10-2002, 03:20 PM   #4
The Fly
u2elevatejo's Avatar
Join Date: May 2002
Location: UK
Posts: 110
Local Time: 10:51 AM
Thanks for the tips so far. I'm using the Visual Basic software, drop and drag type stuff where we just fill in the code, actions etc..

A friend said this code would help:

Function F2C(sngF As Single) As Single
f2c = (sngf-32)*5/9
End Function

Function C2F(sngC As Single) As Single
c2f = 32 + sngc*9/5
End Function

Function F2M(sngF As Single) As Single
f2m = sngf * 0.3012
End Function

Function M2F(sngM As Single) As Single
m2f = sngm / 0.3012
End Function

This all rings a bell. I'll have to look through some of the notes I've taken. The thing that annoys me is that we did some quite complex coding but we only copied it from a book or the board.. we didn't actually 'work it out' which is why I'm having problems writing my own!

Basically, all it says in the requirements is:

A conversion program is to be written which can convert, bi-directionally:

(all that stuff I listed before)

The interface should be clear, simple and easy to use. The program must reject inappropriate input and notify the user.

Helpful huh.

I'm looking through all the material I was given and it's really not helping. I have until Friday so I'm going to have a good read tonight and see if I can find anything useful. It would also help if I had access to a PC with visual basic on... the only ones we can use at college (for our group) are in the resourse room where every man and his dog is using them. Why couldn't it be done on a mac!

Thanks again for helping - I certainly need it!

u2elevatejo is offline  
Old 06-10-2002, 07:16 PM   #5
Rock n' Roll Doggie
ouizy's Avatar
Join Date: Jan 2001
Location: s p o r a t i c
Posts: 3,790
Local Time: 06:51 AM
I don't know it for shit, but do a search dude, in 23 seconds I found this:
ouizy is offline  
Old 06-10-2002, 10:12 PM   #6
Forum Moderator
Bonochick's Avatar
Join Date: Nov 2000
Location: Cherry Lane
Posts: 40,819
Local Time: 06:51 AM

VB = Evil

I hate it.

I got an A in it, but I hate it.

And VBA is worse.
"Knight in shining Zubaz."

Bonochick [at]
Bonochick is offline  
Old 06-11-2002, 05:37 PM   #7
The Fly
KevM's Avatar
Join Date: Aug 2000
Location: Canada
Posts: 113
Local Time: 05:51 AM
I used to do lots of VB programming its not that hard ... but I tought my self, when I took it in high school I found that the course was stupid and didn't teach anyone much except how to follow step by step instructions.

The first thing to do is the interface:
I'd keep it quite simple
you neet a textbox to get the users input
and another one for the output (you can set it so that its not editable using its properties)

then i'd add buttons for each conversion.

Next you need the code:

double click on a button this will open the code window for that buttons click event (the code that goes in here will be run when the user clicks this button)

it should start with something like this

Private Sub Command1_Click()
after this you need to add the conversion code

which would look something like this

If Not IsNumeric(Text1.Text) 'this tests too see if the input is a number
	MsgBox("Error Input is not a number") 'this will show an error message if it is not a number
Else 'otherwise do the conversion
	Text2.Text = F2C(Text1.Text) 'this will convert Fahrenheit to Celsius using the function F2C
End If
just do that for each button changing the function and include the functions you friend gave you

I hope thats clear ... i havent done VB in a long time
KevM is offline  
Old 06-11-2002, 06:55 PM   #8
The Fly
u2elevatejo's Avatar
Join Date: May 2002
Location: UK
Posts: 110
Local Time: 10:51 AM



u2elevatejo is offline  
Old 06-12-2002, 12:21 AM   #9
An Angel In Devil's Shoes
ABEL's Avatar
Join Date: Jan 2001
Location: Netherlands
Posts: 18,844
Local Time: 04:51 AM

I feel like my brain is going to explode after reading all that, lol


ABEL is offline  

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

All times are GMT -5. The time now is 05:51 AM.

Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Design, images and all things inclusive copyright ©