Results 1 to 10 of 10

Thread: [RESOLVED] Can someone help a newbie out?

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2005
    Posts
    3

    Resolved [RESOLVED] Can someone help a newbie out?

    I'm trying to just create a simple program that does the following:

    Enter your name: yournamehere

    And then the program spits out:
    Welcome to my program: yournamehere

    Can anyone tell me where to begin?

  2. #2
    Fanatic Member vbasicgirl's Avatar
    Join Date
    Jan 2004
    Location
    Manchester, UK
    Posts
    1,016

    Re: Can someone help a newbie out?

    put a textbox and a command button on a form and put this in the command buttons click event
    VB Code:
    1. Private Sub Command1_Click()
    2.  
    3.  MsgBox "Welcome to my program: " & Text1.Text
    4.  
    5. End Sub
    notice the use of the ampersand(&) to join two strings together
    casey.

  3. #3
    Frenzied Member I_Love_My_Vans's Avatar
    Join Date
    Jan 2005
    Location
    In the PHP compiler
    Posts
    1,275

    Re: Can someone help a newbie out?

    Welcome to the forums, it seems as if your new to VB, so am i, have been coding for about 10 months.

    Some advice, go to www.vbcode.com and download a few simple programs, and edit them for your own use, you should learn so much from this.

    Cheers
    ILMV

  4. #4
    Elite Hacker Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,349

    Re: Can someone help a newbie out?

    To Jeff: Be sure to give sensible thread titles next time, Jeff. Take a look at the link in my signature on that to see what I mean. Also since your problem is resolved, go upto Thread Tools and click on [Mark Thread Resolved]

    To I Love My Vans: 10 Months? 13 years here. 8 years in VB

  5. #5
    G&G Moderator chemicalNova's Avatar
    Join Date
    Jun 2002
    Location
    Victoria, Australia
    Posts
    4,246

    Re: Can someone help a newbie out?

    Quote Originally Posted by Jacob Roman
    To I Love My Vans: 10 Months? 13 years here. 8 years in VB
    And when did your DirectX obsession begin?

    chem

    Visual Studio 6, Visual Studio.NET 2005, MASM

  6. #6
    Elite Hacker Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,349

    Re: Can someone help a newbie out?

    Ohhhhh I'd say 2 maybe 3 years ago. Before then I spent like 3 years making a 3D engine using pure VB. Found out the hardway that DX pwned in that department.

  7. #7
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Can someone help a newbie out?

    Even easier!
    VB Code:
    1. Option Explicit
    2.  
    3. Private Sub Form_Load()
    4.   MsgBox "Welcome to my program: " & InputBox("Enter Name:", "Name")
    5. End Sub

  8. #8
    No place like 127.0.0.1 eyeRmonkey's Avatar
    Join Date
    Jul 2005
    Location
    Blissful Oblivion
    Posts
    2,306

    Re: Can someone help a newbie out?

    Quote Originally Posted by dglienna
    Even easier!
    VB Code:
    1. Option Explicit
    2.  
    3. Private Sub Form_Load()
    4.   MsgBox "Welcome to my program: " & InputBox("Enter Name:", "Name")
    5. End Sub
    Not bad, but not very easy to read/understand for someone who doesn't know how the flow of execution would work.

    I reccomend checking out a book on VB from your local library. Thats how I taught myself. Since then most of what I have learned have been from these forums.

    PS - When your questions has been answered please follow the directions in my signature to mark this thread as resolved.
    Visual Studio 2005 Professional Edition (.NET Framework 2.0)
    ~ VB .NET Links: Visual Basic 6 to .NET Function Equivalents (Thread) | Refactor! (White Paper) | Easy Control for Wizard Forms | Making A Proper UI For WinForms | Graphics & GDI+ Tutorial | Websites For Free Icons
    ~ QUOTE: Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rich Cook

    ~ eyeRmonkey.com

  9. #9

    Thread Starter
    New Member
    Join Date
    Jul 2005
    Posts
    3

    Re: Can someone help a newbie out?

    Thanks Casey - that seemed to do the trick!

  10. #10
    Elite Hacker Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,349

    Re: [RESOLVED] Can someone help a newbie out?

    Also don't forget to rate peoples posts who have been helpful. Some newcomers tend to miss the Reputation system until someone actualy tells them that there is one. That's what that green gem is underneath your Post count

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