Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. i need help with a vb project anything helps! :)

i need help with a vb project anything helps! :)

Scheduled Pinned Locked Moved Visual Basic
businesshelp
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Member 11264383
    wrote on last edited by
    #1

    Im completing a project for my VB class and kind of lost at some things.. these are the requirements: Julia really liked the How Big is My Room app but realized it would be much better if she could calculate the cost of ALL of her rooms in the same window. She would keep a similar layout, but change the program to handle a list of rooms, displaying the size and cost of all of the rooms and a total cost to resurface the floors in her entire home. 1. She knows that if she measures the length and width of each room, she can determine the area or square-footage. (roomSize = roomWidth * roomLength) 2. To get the price for each room she multiplies the area of the room times the price of the material (totalCost = roomSize * costOfMaterial) 3. Presents the user with a picture of carpet or other flooring material (you will need to find an images on the World Wide Web and download it. Must be in JPG,PNG,GIF,TIF format) a. b. Present the user the option to enter her first name c. Present the user the option to enter her last name d. Present the user the option to enter the room name e. Present the user the option to enter the room width (in feet) f. Present the user the option to enter the room length (in feet) 1) The picture must change to the corresponding floor type 2) The cost of material must change 3) The cost per room for each room must change and be displayed properly 4) The output totals should reflect the change i. When a user changes a floor type… Present the user the option to choose a floor type using radio buttons. The text of the radio button should reflect the type and cost per sq/ft for that type. g. Present a list of rooms in a list box. Each room in the list box will be indicated by its room name h. i. Use other listboxes to keep track of the length, width and total cost of a room. Presents the user the option to submit the entry with a button by clicking with the mouse or pressing the enter key. j.Check to make sure all boxes are filled in. Warn the user with a message box that states "Please enter something in all boxes" (or a similar message) -- (hint: if textbox1.text <> "" and textbox2.text <> "" then…) i. Check to make sure the user has chosen a floor type. Warn the user with a message that states "Please choose a Floor Type first!" (or a similar message) -- (hint: if radio1.checked = true then…) iii. Enter the room information to the appropriate list boxes a) First Name "Julia" b) Last Name "Anderson" 1) If the user provides the following input iv

    L 1 Reply Last reply
    0
    • M Member 11264383

      Im completing a project for my VB class and kind of lost at some things.. these are the requirements: Julia really liked the How Big is My Room app but realized it would be much better if she could calculate the cost of ALL of her rooms in the same window. She would keep a similar layout, but change the program to handle a list of rooms, displaying the size and cost of all of the rooms and a total cost to resurface the floors in her entire home. 1. She knows that if she measures the length and width of each room, she can determine the area or square-footage. (roomSize = roomWidth * roomLength) 2. To get the price for each room she multiplies the area of the room times the price of the material (totalCost = roomSize * costOfMaterial) 3. Presents the user with a picture of carpet or other flooring material (you will need to find an images on the World Wide Web and download it. Must be in JPG,PNG,GIF,TIF format) a. b. Present the user the option to enter her first name c. Present the user the option to enter her last name d. Present the user the option to enter the room name e. Present the user the option to enter the room width (in feet) f. Present the user the option to enter the room length (in feet) 1) The picture must change to the corresponding floor type 2) The cost of material must change 3) The cost per room for each room must change and be displayed properly 4) The output totals should reflect the change i. When a user changes a floor type… Present the user the option to choose a floor type using radio buttons. The text of the radio button should reflect the type and cost per sq/ft for that type. g. Present a list of rooms in a list box. Each room in the list box will be indicated by its room name h. i. Use other listboxes to keep track of the length, width and total cost of a room. Presents the user the option to submit the entry with a button by clicking with the mouse or pressing the enter key. j.Check to make sure all boxes are filled in. Warn the user with a message box that states "Please enter something in all boxes" (or a similar message) -- (hint: if textbox1.text <> "" and textbox2.text <> "" then…) i. Check to make sure the user has chosen a floor type. Warn the user with a message that states "Please choose a Floor Type first!" (or a similar message) -- (hint: if radio1.checked = true then…) iii. Enter the room information to the appropriate list boxes a) First Name "Julia" b) Last Name "Anderson" 1) If the user provides the following input iv

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Any specific question? I'd rather not wade through each question simply to check if that's already in the code. Anyone of them in particular you're having trouble with?

      Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]

      M 1 Reply Last reply
      0
      • L Lost User

        Any specific question? I'd rather not wade through each question simply to check if that's already in the code. Anyone of them in particular you're having trouble with?

        Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]

        M Offline
        M Offline
        Member 11264383
        wrote on last edited by
        #3

        Yes I'm having trouble with moving the data from the text box to the list of seperately, when it calculate and move together, I tried the if else but it keep popping up with a error. Thanks

        L 1 Reply Last reply
        0
        • M Member 11264383

          Yes I'm having trouble with moving the data from the text box to the list of seperately, when it calculate and move together, I tried the if else but it keep popping up with a error. Thanks

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          Member 11264383 wrote:

          moving the data from the text box to the list of seperately,

          Which list is that? You're already adding data from a textbox to a listbox, so that is probably not what you meant.

          Member 11264383 wrote:

          when it calculate and move together

          I'd use a button. You could automatically recalculate whenever one of the entries change, but it is really a lot easier to have a button that says "calculate now". You'd have to foreach each room, and perform the calculation.

          Member 11264383 wrote:

          I tried the if else but it keep popping up with a error.

          What error?

          Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]

          R 1 Reply Last reply
          0
          • L Lost User

            Member 11264383 wrote:

            moving the data from the text box to the list of seperately,

            Which list is that? You're already adding data from a textbox to a listbox, so that is probably not what you meant.

            Member 11264383 wrote:

            when it calculate and move together

            I'd use a button. You could automatically recalculate whenever one of the entries change, but it is really a lot easier to have a button that says "calculate now". You'd have to foreach each room, and perform the calculation.

            Member 11264383 wrote:

            I tried the if else but it keep popping up with a error.

            What error?

            Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]

            R Offline
            R Offline
            rx7man
            wrote on last edited by
            #5

            Eddy is right in the foreach, but for recalculation, I'd have a handler that handles the on change event from each of the boxes, it can all be done in one subroutine

            'kinda like this
            private sub TextboxChanged(sender as object, e as eventargs) handles txtRoomWidth.changed, txtRoomLength.changed, lstFlooringType.changed

            dim SquareFootage as single = txtRoomWidth.value * txtRoomLength.value
            dim CostPerFoot as single 'Insert code here to get the cost per square foot of the current flooring type

            dim RoomCost as single = Squarefootage * CostPerFoot

            'put code here to insert the cost into the list of costs

            dim totalprice as single = 0

            foreach RoomPrice as single in RoomPriceList
                totalprice += RoomPrice
            next
            

            txtTotalprice.value = "Total cost is $" & totalprice

            end sub

            I'd have used the names you used, but I can't open both windows at once

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups