|
-
Aug 8th, 2012, 06:52 AM
#1
Thread Starter
New Member
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.
-
Aug 8th, 2012, 11:27 AM
#2
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.
-
Aug 8th, 2012, 12:13 PM
#3
Thread Starter
New Member
Re: I need some help
 Originally Posted by dunfiddlin
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.
-
Aug 9th, 2012, 06:34 AM
#4
Thread Starter
New Member
Re: I have another question! Please help!
I have changed the first post because I have another question!
-
Aug 9th, 2012, 07:53 AM
#5
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.
-
Aug 9th, 2012, 08:10 AM
#6
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
-
Aug 9th, 2012, 08:47 AM
#7
Thread Starter
New Member
Re: I have another question! Please help!
 Originally Posted by si_the_geek
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.
 Originally Posted by FunkyDexter
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|