Results 1 to 15 of 15

Thread: [resolved] VB Applications

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2007
    Posts
    23

    Resolved [resolved] VB Applications

    hello.. hw can i make vb appkication, which asks the user for first name, middle name, and title and address. it displays first character of the first name, first character of the middle name and the title on one lable and address on another label..
    thnx for rplyin..
    Last edited by adad; Mar 29th, 2007 at 01:52 AM. Reason: resolved

  2. #2
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Re: VB Applications

    The best way would be to put TextBoxes on a form or something to have them enter their info.

    Not sure if this is how you want it but, add 2 labels on your form. lblName and lblAddress
    vb Code:
    1. Option Explicit
    2.  
    3. Private strFName As String 'First name.
    4. Private strMName As String 'Middle name.
    5. Private strTitle As String 'Title.
    6. Private strAddress As String 'Address.
    7.  
    8. Private Sub Form_Load()
    9.     strFName = InputBox("Enter your first name: ")
    10.     strMName = InputBox("Enter your middle name: ")
    11.     strTitle = InputBox("Enter a title: ")
    12.     strAddress = InputBox("Enter your address: ")
    13.    
    14.     lblName.Caption = Left$(strFName, 1) & " " & Left$(strMName, 1) & " " & strTitle
    15.     lblAddress.Caption = strAddress
    16. End Sub

  3. #3
    Hyperactive Member Capp's Avatar
    Join Date
    May 2005
    Location
    Texas
    Posts
    409

    Re: VB Applications

    Code:
    Dim strFirst, strMiddle as String
    Dim strAddress, strTitle as string
    
    strFirst = inputbox("Enter your First name")
    strMiddle = inputbox("Enter your Middle name")
    strTitle = inputbox("Enter your Title")
    strAddress = inputbox("Enter your Address")
    
    Label1.Caption = Left$(strFirst,1) & " " & Left$(strMiddle,1) & " " & strTitle
    Label2.Caption = strAddress
    something like that?
    AmazingAntivirus.com
    Remote Data Backups


    Please Mark your Thread "Resolved", if the query is solved...

    If a post has helped you then Please Rate it!

  4. #4
    Hyperactive Member Capp's Avatar
    Join Date
    May 2005
    Location
    Texas
    Posts
    409

    Re: VB Applications

    Dang...mine hung while posting and you beat me to it
    AmazingAntivirus.com
    Remote Data Backups


    Please Mark your Thread "Resolved", if the query is solved...

    If a post has helped you then Please Rate it!

  5. #5
    I don't do your homework! opus's Avatar
    Join Date
    Jun 2000
    Location
    Good Old Europe
    Posts
    3,863

    Re: VB Applications

    We all like doing other ones homework in here, don't we
    You're welcome to rate this post!
    If your problem is solved, please use the Mark thread as resolved button


    Wait, I'm too old to hurry!

  6. #6
    Lively Member
    Join Date
    Mar 2007
    Posts
    124

    Re: VB Applications

    Is this a posting race? The fastest poster will win 1 million dollars. lol.

  7. #7
    Hyperactive Member Capp's Avatar
    Join Date
    May 2005
    Location
    Texas
    Posts
    409

    Re: VB Applications

    Quote Originally Posted by opus
    We all like doing other ones homework in here, don't we
    Yes we do.
    I find the best way to learn how to code is to look at somebody else's code.
    AmazingAntivirus.com
    Remote Data Backups


    Please Mark your Thread "Resolved", if the query is solved...

    If a post has helped you then Please Rate it!

  8. #8
    Lively Member
    Join Date
    Mar 2007
    Posts
    124

    Re: VB Applications

    Hey opus and Capp, I have lots of homework. Do you wanna take care of my homeworks? lol. Yes, you're maybe right looking at others problems eh?

  9. #9
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Re: VB Applications

    Quote Originally Posted by Capp
    Yes we do.
    I find the best way to learn how to code is to look at somebody else's code.
    That's how I learned.

    Quote Originally Posted by opus
    We all like doing other ones homework in here, don't we
    When it's something like this that takes about 30 seconds to write I really don't mind too much. Especially since the best way to learn sometimes is by looking at other code as Capp said.

  10. #10
    Frenzied Member zynder's Avatar
    Join Date
    Nov 2006
    Location
    localhost
    Posts
    1,434

    Re: VB Applications

    It's true actually. We learned from other's problems. Everyday, we gained new information by the problems of others and we try to solved it. By that way, we develop our skills. And not just that, It's a good thig to help others, right?

  11. #11

    Thread Starter
    Junior Member
    Join Date
    Mar 2007
    Posts
    23

    Thumbs up Re: VB Applications resolved

    Quote Originally Posted by DigiRev
    The best way would be to put TextBoxes on a form or something to have them enter their info.

    Not sure if this is how you want it but, add 2 labels on your form. lblName and lblAddress
    vb Code:
    1. Option Explicit
    2.  
    3. Private strFName As String 'First name.
    4. Private strMName As String 'Middle name.
    5. Private strTitle As String 'Title.
    6. Private strAddress As String 'Address.
    7.  
    8. Private Sub Form_Load()
    9.     strFName = InputBox("Enter your first name: ")
    10.     strMName = InputBox("Enter your middle name: ")
    11.     strTitle = InputBox("Enter a title: ")
    12.     strAddress = InputBox("Enter your address: ")
    13.    
    14.     lblName.Caption = Left$(strFName, 1) & " " & Left$(strMName, 1) & " " & strTitle
    15.     lblAddress.Caption = strAddress
    16. End Sub
    thnx

  12. #12

    Thread Starter
    Junior Member
    Join Date
    Mar 2007
    Posts
    23

    Smile Re: VB Applications

    Quote Originally Posted by Capp
    Code:
    Dim strFirst, strMiddle as String
    Dim strAddress, strTitle as string
    
    strFirst = inputbox("Enter your First name")
    strMiddle = inputbox("Enter your Middle name")
    strTitle = inputbox("Enter your Title")
    strAddress = inputbox("Enter your Address")
    
    Label1.Caption = Left$(strFirst,1) & " " & Left$(strMiddle,1) & " " & strTitle
    Label2.Caption = strAddress
    something like that?
    thnx bro..

  13. #13

    Thread Starter
    Junior Member
    Join Date
    Mar 2007
    Posts
    23

    Re: [resolved] VB Applications

    thnx for rplyin to all of u..

  14. #14
    I don't do your homework! opus's Avatar
    Join Date
    Jun 2000
    Location
    Good Old Europe
    Posts
    3,863

    Re: VB Applications

    Quote Originally Posted by zynder
    It's true actually. We learned from other's problems. Everyday, we gained new information by the problems of others and we try to solved it. By that way, we develop our skills. And not just that, It's a good thig to help others, right?
    I learned programming the same way, however if a thread sounds too much like homework, I prefer to give hints using pseudo-code, that way you need to think and not only copy&paste!
    You're welcome to rate this post!
    If your problem is solved, please use the Mark thread as resolved button


    Wait, I'm too old to hurry!

  15. #15

    Thread Starter
    Junior Member
    Join Date
    Mar 2007
    Posts
    23

    Thumbs up Re: VB Applications

    Quote Originally Posted by opus
    I learned programming the same way, however if a thread sounds too much like homework, I prefer to give hints using pseudo-code, that way you need to think and not only copy&paste!
    yes u r right.. thnx bro

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