Results 1 to 14 of 14

Thread: Vb6 Please Help Never Used It

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2006
    Posts
    6

    Vb6 Please Help Never Used It

    ok guys ive been told to make these programs without even been told how to use them so i need somebodys help to make them for me if your good at it only take like 10 to 30 minutes ok their is 8 of them so here we go

    1 write a program to convert a temperature in degress fahrenheit into degress celsius ( dubtract 32, divided by 9 and multiply by 5) then add a button that will convert from celsius to fahreneit.

    2. write a program that calculates average speeds and fual consumption for a car journey. the information needed is distance travelled, time taking and quantity of fual used.

    3. a salesman is paid monthly salary of 1500. if his sales are over £20000 his is paid 8% of the value of the sales instead. write a program that reads in a salesmans name and sales for the month and caluclate his gross earning. display his name and gross earnings.

    4. write a program that displays a price number between 1 and 10 and which asks the user to guss a number. if the guess is wrong it will indicate wither "to high" or "to low" and ask for another guess. if the user guesses correctly it will display a suitable message and the number of guesses taken.

    5. write a program that displays a price table for fuel, showing the price for quantities from 1 litre up to 10 litres. the input data is the price of 1 litre of fual
    alter the program to display the prices for 10,20,30 and up to 100litres

    6 write a program that allows a user to order a pizza. the program should allow the user to select size( small, medium, large) abd a selection of toppings. small cost £2 medium cost £2.50 and large cost £3 abd each topping is charged at 50p. the program shouls display the order and the price of the pizza

    7 write a program to process a series of exam marks (out of 100), DISPLAYING THE NUMBER OF PASSES , FAILS , MERITS abd the average mark. the pass mark is 50 and a merit is 65 and over

    8 write a program to give multiplication test to young children. the program will give 5 simple multiplication question to be answered. (use the random number function to generate different questions). afer each question display a suitable message indicating whether if was answered correctly r not. if its wrong display the correct answer.
    calculate the number of correct answers and display the childs score at the end. if the score is 5 out of 5 display a congrats message.

    now i know what your thinking right now but ive been giving these to do and i have no clue on how to do it if somebody will do them then i can study them and make more programs in the futures and time to come you can either send them to my email address or post em here heres my email address

    [email protected]

  2. #2
    PowerPoster Pasvorto's Avatar
    Join Date
    Oct 2002
    Location
    Minnesota, USA
    Posts
    2,951

    Re: Vb6 Please Help Never Used It

    Sounds like homework.

  3. #3
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: Vb6 Please Help Never Used It

    welcome!

    1. Get your EMAIL off of your post!! not a good idea... bots will get it in no time.

    2. who is asking u to write these? y would they ask u if u have never done this before?
    these sound like school assignments... if they are for school. just say so. dont try to trick us. we will not write them for u, but will help u learn how to do it.
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  4. #4

    Thread Starter
    New Member
    Join Date
    Sep 2006
    Posts
    6

    Re: Vb6 Please Help Never Used It

    ok you got me it is home work but the only thing we got told is how to make a calculator thats it can anybody help me?

  5. #5

  6. #6
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: Vb6 Please Help Never Used It

    well, plan it out... lets start with #1

    what do u need to have on the form to make the program work?
    1 textbox - allow the user to enter the number
    2 buttons -click one to convert F to C and the other C to F

    fairly simple.
    here is a sample of how to take the number in a textbox and do math on it..then put it back into the textbox

    VB Code:
    1. Text1.Text = Val(Text1.Text) * 5

    Val() turns it into a value instead of a string

    now I have u given u enough code to write the entire program...

    HINT: VB does math in a certain order, so use Parenthisis to make it go in the order u want
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  7. #7

    Thread Starter
    New Member
    Join Date
    Sep 2006
    Posts
    6

    Re: Vb6 Please Help Never Used It

    this is what i got so far

    Option Explicit
    Private far1 As Integer
    Private far2 As Integer
    Private cel1 As Integer
    Private cel2 As Integer



    Private Sub cmdfd_Click()

    End Sub

    Private Sub TXT1_Change()
    cel2 = (far1 - 32) / 9 * 5
    End Sub

  8. #8
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: Vb6 Please Help Never Used It

    you math is right.. but I would not put it in the change event... i would put it in the click event of the button.
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  9. #9

    Thread Starter
    New Member
    Join Date
    Sep 2006
    Posts
    6

    Re: Vb6 Please Help Never Used It

    what you mean event button

  10. #10

    Thread Starter
    New Member
    Join Date
    Sep 2006
    Posts
    6

    Re: Vb6 Please Help Never Used It

    i got 2 number boxes 1 for degrees into far and another for far to degrees and 2 buttons

  11. #11
    PowerPoster Pasvorto's Avatar
    Join Date
    Oct 2002
    Location
    Minnesota, USA
    Posts
    2,951

    Re: Vb6 Please Help Never Used It

    I wouldn't put your code int he change event. It will execute everytime the text box changes.

    I would add 2 command buttons: F -> C; C -> F and put the code there. Have one label which displays the result. Have one text box which receives the value to be converted.

  12. #12
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: Vb6 Please Help Never Used It

    Okay, thanks for posting that. A Change event like the Change event where you put your calculation occurs every time something is typed in that textbox, so if for example someone typed 100 in that textbox the calculation would try to run 3 times. You probably don't want that to happen so the best thing would probably be to create a command button and put the code there. Before you do that however you need to think about where the value for far1 comes from.

  13. #13
    PowerPoster Pasvorto's Avatar
    Join Date
    Oct 2002
    Location
    Minnesota, USA
    Posts
    2,951

    Re: Vb6 Please Help Never Used It

    f -> c

    labelresult.caption = ((val(textinput).text) - 32) / 9) * 5

  14. #14

    Thread Starter
    New Member
    Join Date
    Sep 2006
    Posts
    6

    Re: Vb6 Please Help Never Used It

    ok ill try make it see how it goes thanks for the help

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width