hacking game (VB.NET)

Discussion in 'Software' started by adam62385, Jun 16, 2004.

  1. adam62385

    adam62385 Private E-2

    Hi, all! What I'm working on now is the beginnings of a computer hacking game. On my first (and only, as of yet) form, I have a label that instructs the user to fill in the information that's asked of them, then I have a label directly below that for a company name. I have a label "name:" and a textbox out beside that label for the user to give their name, and below that I have a label "phone number" for users to give their phone number. Now.... I should honestly remember how to do this, cause I had a class in VB6 a while back, and now I've upgraded to VB.NET.

    In coding the program, I have 2 variables declared: P for phone number and N for name. Here's the catch, though..... I can get this to work for me using code like this:

    Dim N as string="Adam Wilson"
    Dim P as string="742-7749"


    However, I don't want this to work for only me.... how can I make it so that any name or any phone number that is input will produce a message box? (I'm not telling what the message is...lol)


    Also, I've tried to think my way through this as thouroughly as possible, but is there any way that I won't have to be using x number of forms for this program? is there a way in vb.net to clear my first form, then reload that form with i information (i.e.- reload the form w/ text boxes, labels, whatever I need)?


    Thanks for the help! I would appreciate it if you would send replies to my email address: adam62385@aol.com


    Thanks again!!
     
  2. jawpaul

    jawpaul Private E-2

    Not very clear.

    Is this what you want todo?

    Take the users input from the textboxes and assign that to your two variables.

    To assign the text value of a text box to a variable use the following code.

    Code:
     Dim strName as string = txtName.Text 
    Adjust the name of your variables, and name of the textbox as needed(txtName here)
     
  3. adam62385

    adam62385 Private E-2

    thanks... I got that one worked out. Now, I've gotten 3 forms up, and I'm working on my 3rd.... step by step.... you click a button on form 1, and form 2 pops up after all info has been entered..... same w/ form 2....... click the corresponding button, and form 3 is supposed to pop up.... I can get form 2 to pop up, but I can't get form 3 to show. I think the code for getting form 2 to pop up was like this:

    dim f2 as form2
    f2 = New Form2

    f2.Show()

    Me.Visible = False

    Now, I can't get the third form to show up.... please help.

    Thanks so much!!


    Adam
     
  4. adam62385

    adam62385 Private E-2

    again, figured that one out, too.
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds