dcsimg
Page 2 of 4 FirstFirst 1234 LastLast
Results 41 to 80 of 155

Thread: I am using visual basic 2010 and require help to proceed

  1. #41
    New Member
    Join Date
    Jan 2014
    Posts
    2

    Re: I am using visual basic 2010 and require help to proceed

    It's all pretty good . good luck for your program . It's looks like very use full .
    bSBYLZ

  2. #42

    Thread Starter
    Lively Member
    Join Date
    Jan 2014
    Posts
    95

    Re: I am using visual basic 2010 and require help to proceed

    Sub Main()
    Last edited by junied32167; Jan 23rd, 2014 at 06:51 PM.

  3. #43
    New Member
    Join Date
    Jan 2014
    Posts
    10

    Re: I am using visual basic 2010 and require help to proceed

    You have already done the calculations. Area of room is Width x Height. Just remember to put it in meter squared as requested on the assignment.
    Last edited by Mohammed Tahmid; Jan 24th, 2014 at 03:11 PM.

  4. #44

    Thread Starter
    Lively Member
    Join Date
    Jan 2014
    Posts
    95

    Re: I am using visual basic 2010 and require help to proceed

    I belive there is something wrong with my coding as i can not calculate the area of the room when d program is run

  5. #45
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    32,689

    Re: I am using visual basic 2010 and require help to proceed

    You don't want the area of the room. You want the surface area of the walls... which is completely different. You need to add the lengths of the 4 walls together, then multiply that by the height.

    you were close with this:
    areaofroom = (wall1 + wall2 + wall3 + wall4 * rHeight)

    but what you really need it this:
    areaofroom = (wall1 + wall2 + wall3 + wall4) * rHeight

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  6. #46
    Super Moderator Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: I am using visual basic 2010 and require help to proceed

    Quote Originally Posted by dunfiddlin View Post
    Are you trying to get me banned again?
    I sincerely hope not since most of your replies in this forum have been very valuable. I banned you because of the few replies you made that simply ****ed people off! Those few posts, which with your post count turned out to be much more than a few, was simply not acceptable. So I truly hope that you, in the future, keep posting those valuable posts, that we all love to see from you, and that you simply refrain from posting *at all* in those threads where you feel that you need to lecture the OP.

    I would really hate to ban you for life since you do have the ability to help people around here.
    Joacim Andersson
    If anyone's answer has helped you, please show your appreciation by rating that answer.
    I'd rather run ScriptBrix...
    Joacim's view on stuff.

    MVP

  7. #47
    Bad man! ident's Avatar
    Join Date
    Mar 2009
    Location
    Cambridge
    Posts
    5,329

    Re: I am using visual basic 2010 and require help to proceed

    I would hate for dun to be banned. I always feel more warmed to him and members like Niya who can mix it with the professionals when they dont program for a living. I guess moderators have to separate personal views and take each post on a serious level. (your friends book arrived and i must say kis great even 4 chapters in)

  8. #48

    Thread Starter
    Lively Member
    Join Date
    Jan 2014
    Posts
    95

    Re: I am using visual basic 2010 and require help to proceed

    sub menu
    Last edited by junied32167; Jan 23rd, 2014 at 06:52 PM.

  9. #49
    New Member
    Join Date
    Jan 2014
    Posts
    10

    Re: I am using visual basic 2010 and require help to proceed

    lol, Kudos. A few problems. The Console.ReadLine() comes afterwards. Also you didn't output the value onto the screen yet. You can do this by concatenation of strings:

    areaofroom = (wall1 + wall2 + wall3 + wall4) * rHeight
    Console.WriteLine("Area of room: " & areaofroom)
    Console.ReadLine()
    Last edited by Mohammed Tahmid; Jan 24th, 2014 at 03:12 PM.

  10. #50

    Thread Starter
    Lively Member
    Join Date
    Jan 2014
    Posts
    95

    Re: I am using visual basic 2010 and require help to proceed

    Thank you so much for that. My calculation is working now.
    Last edited by junied32167; Jan 24th, 2014 at 03:32 PM.

  11. #51
    Super Moderator Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: I am using visual basic 2010 and require help to proceed

    Quote Originally Posted by junied32167 View Post
    who is kudos. I think you have me confused wiv someone else.
    lol
    Quote Originally Posted by wikipedia
    kudos (from the ancient greek: κῦδος) is acclaim or praise for exceptional achievement.
    Joacim Andersson
    If anyone's answer has helped you, please show your appreciation by rating that answer.
    I'd rather run ScriptBrix...
    Joacim's view on stuff.

    MVP

  12. #52
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    5,616

    Re: I am using visual basic 2010 and require help to proceed

    kudos as neuter means acclaim,glory,pride etc
    However kudos as adjective means insult,taunt,slander. (the beauty of Greek language)
    So clearly Mohammed is secretly bashing that poor guy and should be immediately banned!!
    Good thing you've got those Greek people here to catch the ancient Greek secret insults
    P.S. If you don't get banned once, it does not worth the trip. So thanks for whoever banned me a couple of years ago!
    Slow as hell.

  13. #53
    PowerPoster dunfiddlin's Avatar
    Join Date
    Jun 2012
    Posts
    8,242

    Re: I am using visual basic 2010 and require help to proceed

    However kudos as adjective means insult,taunt,slander. (the beauty of Greek language)
    Um. I'm sure that even in Greek an adjective can't mean a noun! Kudos is in this case a naturalised English word anyway. Any darker associations may be discounted.
    As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"

    Reviews: "dunfiddlin likes his DataTables" - jmcilhinney

    Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!

  14. #54

    Thread Starter
    Lively Member
    Join Date
    Jan 2014
    Posts
    95

    Re: I am using visual basic 2010 and require help to proceed

    sub main
    Last edited by junied32167; Jan 23rd, 2014 at 06:53 PM.

  15. #55
    PowerPoster dunfiddlin's Avatar
    Join Date
    Jun 2012
    Posts
    8,242

    Re: I am using visual basic 2010 and require help to proceed

    I require help as to how im goona do this.
    You really don't. It's essentially exactly the same procedure as what you've done so far. You could snazz it up a bit by having the user type in an option rather than a price but before this turns into War And Peace keep doing what you're doing.
    As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"

    Reviews: "dunfiddlin likes his DataTables" - jmcilhinney

    Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!

  16. #56

    Thread Starter
    Lively Member
    Join Date
    Jan 2014
    Posts
    95

    Re: I am using visual basic 2010 and require help to proceed

    Its diffrent the prices how should i dim them. Furthermore integer is not the right variable to use here

  17. #57

    Thread Starter
    Lively Member
    Join Date
    Jan 2014
    Posts
    95

    Re: I am using visual basic 2010 and require help to proceed

    Dim luxury, standard, Economy As Integer()
    Console.WriteLine(" please choose from the following paints")
    luxury = 1.75
    standard = 1.00
    Economy = 0.45
    This is the coding I have used what is wrong with it.

  18. #58
    Super Moderator Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: I am using visual basic 2010 and require help to proceed

    First of all, you're declaring you variables as integer arrays, removed the parenthesis to make them regular integers... However as you've noticed integer is not the correct type, why? Because an integer can only hold, well you know, integers. That is whole numbers (3, 12, 75, or 8 for example) and not anything with a fraction (such as 3.14 or 5.96). A Single or a Double can hold floating point values. I would go with Double since they have better precision.
    Joacim Andersson
    If anyone's answer has helped you, please show your appreciation by rating that answer.
    I'd rather run ScriptBrix...
    Joacim's view on stuff.

    MVP

  19. #59

    Thread Starter
    Lively Member
    Join Date
    Jan 2014
    Posts
    95

    Re: I am using visual basic 2010 and require help to proceed

    Thanks for that Joacim Andersson. Do you know how to add the sign to the prices
    Dim luxury, standard, Economy As Double
    Console.WriteLine(" please choose from the following paints")
    luxury = 1.75
    standard = 1.0
    Economy = 0.45

  20. #60
    Super Moderator Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: I am using visual basic 2010 and require help to proceed

    Well, if you want to type it out you could obviously just do this:
    Code:
    Console.WriteLine("The price for luxury is " & luxury)
    However you can also format the Double into a currency string this way:
    Code:
    Console.WriteLine("The price for luxury is " & luxury.ToString("C"))
    The Double.ToString("C") means that you want to convert the value into a string in currency format. However this is culture aware so the output will depend on your Windows culture settings. In the UK the output will be 1.75, in the US it will be $1.75 and for me, who lives in Sweden, the output will be 1,75 kr (yes, we use comma as the separator in Sweden), in other parts of Europe the output will either be €1.75 or €1,75 depending if the country in question use period or comma as the separator (other separators might also exist when it comes to currency, so perhaps something like €1:75 would be the output).
    Last edited by Joacim Andersson; Jan 21st, 2014 at 01:15 PM.
    Joacim Andersson
    If anyone's answer has helped you, please show your appreciation by rating that answer.
    I'd rather run ScriptBrix...
    Joacim's view on stuff.

    MVP

  21. #61
    New Member
    Join Date
    Jan 2014
    Posts
    10

    Re: I am using visual basic 2010 and require help to proceed

    //Post edited.
    Last edited by Mohammed Tahmid; Jan 23rd, 2014 at 07:10 PM.

  22. #62

    Thread Starter
    Lively Member
    Join Date
    Jan 2014
    Posts
    95

    Re: I am using visual basic 2010 and require help to proceed

    how do i give users the option to select a paint type

  23. #63
    Super Moderator FunkyDexter's Avatar
    Join Date
    Apr 2005
    Location
    An obscure body in the SK system. The inhabitants call it Earth
    Posts
    7,470

    Re: I am using visual basic 2010 and require help to proceed

    How did you give them the option to enter the length of a wall? It's exactly the same problem.
    You can depend upon the Americans to do the right thing. But only after they have exhausted every other possibility - Winston Churchill

    Hadoop actually sounds more like the way they greet each other in Yorkshire - Inferrd

  24. #64

    Thread Starter
    Lively Member
    Join Date
    Jan 2014
    Posts
    95

    Re: I am using visual basic 2010 and require help to proceed

    Entering the length of the walls is a must whilst a user will have to choose a paint which is why the coding will be diffrent

  25. #65
    Super Moderator Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: I am using visual basic 2010 and require help to proceed

    Use a ListBox.
    Joacim Andersson
    If anyone's answer has helped you, please show your appreciation by rating that answer.
    I'd rather run ScriptBrix...
    Joacim's view on stuff.

    MVP

  26. #66

    Thread Starter
    Lively Member
    Join Date
    Jan 2014
    Posts
    95

    Re: I am using visual basic 2010 and require help to proceed

    i can only make this program in a console application so i only can use coding

  27. #67
    Frenzied Member CoachBarker's Avatar
    Join Date
    Aug 2007
    Location
    Central NY State
    Posts
    1,120

    Re: I am using visual basic 2010 and require help to proceed

    so then have them type in luxury, standard or economy.

    Code:
    Console.ForegroundColor = ConsoleColor.Blue
    Console.WriteLine("Please enter the type of paint to use")
    paintType = Console.ReadLine
    then do the calculations based on the paint type.
    Thanks
    CoachBarker

    Code Bank Contribution
    Login/Manage Users/Navigate Records
    VB.Net | C#

    Helpful Links: VB.net Tutorial | C Sharp Tutorial | SQL Basics

  28. #68

    Thread Starter
    Lively Member
    Join Date
    Jan 2014
    Posts
    95

    Re: I am using visual basic 2010 and require help to proceed

    but they have to know the options they have to choose from

  29. #69
    Frenzied Member CoachBarker's Avatar
    Join Date
    Aug 2007
    Location
    Central NY State
    Posts
    1,120

    Re: I am using visual basic 2010 and require help to proceed

    Console.WriteLine("Please enter the type of paint to use:luxury, standard or economy. Please pick one.")
    Thanks
    CoachBarker

    Code Bank Contribution
    Login/Manage Users/Navigate Records
    VB.Net | C#

    Helpful Links: VB.net Tutorial | C Sharp Tutorial | SQL Basics

  30. #70

    Thread Starter
    Lively Member
    Join Date
    Jan 2014
    Posts
    95

    Re: I am using visual basic 2010 and require help to proceed

    And after that

  31. #71
    Super Moderator Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: I am using visual basic 2010 and require help to proceed

    I would type out a menu and let the user just pick 1, 2, or 3.
    Code:
    Console.WriteLine("Select a type of color.")
    Console.WriteLine("1 - Luxery")
    Console.WriteLine("2 - Standard")
    Console.WriteLine("3 - Economy")
    Console.Write("Make a selection (1-3): ")
    Dim paintType As String
    Dim doItAgain As Boolean = False
    Do
      Dim paintValue As String = Console.ReadLine()
    
      Select Case paintValue
        Case "1"
          paintType = "Luxury"
        Case "2"
          paintType = "Standard"
        Case "3"
          paintType = "Economy"
        Case Else
          doItAgain = True
          Console.Write("Invalid selection. Try again (1-3): ")
      End Select
    Loop While doItAgain
    Joacim Andersson
    If anyone's answer has helped you, please show your appreciation by rating that answer.
    I'd rather run ScriptBrix...
    Joacim's view on stuff.

    MVP

  32. #72

    Thread Starter
    Lively Member
    Join Date
    Jan 2014
    Posts
    95

    Re: I am using visual basic 2010 and require help to proceed

    If i do that then how would i then calauclate the paint type by the area of the room

  33. #73
    Bad man! ident's Avatar
    Join Date
    Mar 2009
    Location
    Cambridge
    Posts
    5,329

    Re: I am using visual basic 2010 and require help to proceed

    So at what point are you going to do any of this your self? There is trying but this is home work at the end of the day.

  34. #74

    Thread Starter
    Lively Member
    Join Date
    Jan 2014
    Posts
    95

    Re: I am using visual basic 2010 and require help to proceed

    I am trying trial and error

  35. #75
    Bad man! ident's Avatar
    Join Date
    Mar 2009
    Location
    Cambridge
    Posts
    5,329

    Re: I am using visual basic 2010 and require help to proceed

    No what you is doing is after a new solution is posted asking the next question.

  36. #76

    Thread Starter
    Lively Member
    Join Date
    Jan 2014
    Posts
    95

    Re: I am using visual basic 2010 and require help to proceed

    no i do d coding and when i require help i ask you

  37. #77

    Thread Starter
    Lively Member
    Join Date
    Jan 2014
    Posts
    95

    Re: I am using visual basic 2010 and require help to proceed

    If i wanted to restrict the user from entering a number higher then 6 how would i do that

  38. #78
    Super Moderator Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: I am using visual basic 2010 and require help to proceed

    Quote Originally Posted by junied32167 View Post
    If i do that then how would i then calauclate the paint type by the area of the room
    If you already know the area and you know the paint type then do the calculation. Try to think how you would do this in your own head and then try to transform that into source code. It's not very difficult to do.
    Joacim Andersson
    If anyone's answer has helped you, please show your appreciation by rating that answer.
    I'd rather run ScriptBrix...
    Joacim's view on stuff.

    MVP

  39. #79
    Super Moderator Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: I am using visual basic 2010 and require help to proceed

    Quote Originally Posted by junied32167 View Post
    If i wanted to restrict the user from entering a number higher then 6 how would i do that
    I already showed you how to restrict the user from choosing between 1, 2, and 3.
    Joacim Andersson
    If anyone's answer has helped you, please show your appreciation by rating that answer.
    I'd rather run ScriptBrix...
    Joacim's view on stuff.

    MVP

  40. #80

    Thread Starter
    Lively Member
    Join Date
    Jan 2014
    Posts
    95

    Re: I am using visual basic 2010 and require help to proceed

    Can there be more then 6 cases

Page 2 of 4 FirstFirst 1234 LastLast

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width