Results 1 to 7 of 7

Thread: I have another question! Please help!

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2012
    Posts
    6

    I have another question! Please help!

    I have another question for my game. (You can download the demo here: http://www.vbforums.com/showthread.php?686607)

    In the game you find a note with a code to open the safe. The code is 131288, but how can I make that when you enter the code, you only go to the next screen when you enter the right code and when it's anything different that 131288 that it displays a messagebox with 'That's the wrong code' or something. This is what the screen looks like:



    Right now if you type just 1 character in, it automatically goes to the next screen. This is the code:

    Code:
        Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
            Me.Hide()
            Form10.Show()
        End Sub
    Can someone help me? Thanks in advance!
    Last edited by Kiekoes; Aug 9th, 2012 at 06:34 AM.

  2. #2
    PowerPoster dunfiddlin's Avatar
    Join Date
    Jun 2012
    Posts
    8,245

    Re: I need some help

    The MS Label Control cannot be made transparent. The VIBlend label, which you can download as part of their control package and use for free, is on the other hand transparent by default.

    I'm assuming that you have each scene on a different form in which case you use .Show() and .Hide() as required.

  3. #3

    Thread Starter
    New Member
    Join Date
    Aug 2012
    Posts
    6

    Re: I need some help

    Quote Originally Posted by dunfiddlin View Post
    The MS Label Control cannot be made transparent. The VIBlend label, which you can download as part of their control package and use for free, is on the other hand transparent by default.

    I'm assuming that you have each scene on a different form in which case you use .Show() and .Hide() as required.
    Thanks for your reply! It totally worked!
    Last edited by Kiekoes; Aug 8th, 2012 at 12:21 PM.

  4. #4

    Thread Starter
    New Member
    Join Date
    Aug 2012
    Posts
    6

    Re: I have another question! Please help!

    I have changed the first post because I have another question!

  5. #5
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: I have another question! Please help!

    Please don't edit/remove the text from your earlier posts like that - it makes the thread very confusing for people (whether they are attempting to help you, or solve a similar problem), and it causes all kinds of complications, for you and others.

    In addition to that, if you have a new question that isn't a direct extension of the original question (this one isn't) you should be posting it as a new thread, as it is easier for people to focus on the new issue.

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

    Re: I have another question! Please help!

    it makes the thread very confusing for people
    It certainly confused the hell out of me.

    Right now if you type just 1 character in
    That's because you're not check what they've typed in. That even is going to fire every time they type a character into you textbox so unless you check that the content of the textbox is value you're looking for you're always going to move between forms. Just wrap the whole lot in: If TextBox1.Text = 131288
    The best argument against democracy is a five minute conversation with the average voter - Winston Churchill

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

  7. #7

    Thread Starter
    New Member
    Join Date
    Aug 2012
    Posts
    6

    Re: I have another question! Please help!

    Quote Originally Posted by si_the_geek View Post
    Please don't edit/remove the text from your earlier posts like that - it makes the thread very confusing for people (whether they are attempting to help you, or solve a similar problem), and it causes all kinds of complications, for you and others.

    In addition to that, if you have a new question that isn't a direct extension of the original question (this one isn't) you should be posting it as a new thread, as it is easier for people to focus on the new issue.
    OK, next time I will create a new thread.

    Quote Originally Posted by FunkyDexter View Post
    That's because you're not check what they've typed in. That even is going to fire every time they type a character into you textbox so unless you check that the content of the textbox is value you're looking for you're always going to move between forms. Just wrap the whole lot in: If TextBox1.Text = 131288
    Thanks! I added an 'Enter' button so you can enter text. This is the code now:

    Code:
    If TextBox1.Text = "131288" Then
        Me.Hide()
        Form10.Show()
    Else
        MessageBox.Show("That code is not correct!")
    End If

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