|
-
Jan 14th, 2012, 03:47 PM
#1
Thread Starter
New Member
galgje foutmelding picturebox
Ik wilde voor mijn leerlingen op school een galgje maken zodat we onze eigen woorden op een leuke manier kunnen oefenen, ik heb een tutorial op internet gevolgd http://visualstudiotutorials.blogspo...n-game-in.html
Dit is een erg goede uitleg.
Alleen het gaat fout op het moment dat ik niet de hangman plaatjes gebruik maar mijn eigen plaatjes bloem1.jpg, bloem2.jpg, bloem3.jpg enz.
ik krijg geen foutmelding alleen als ik een verkeerde letter intyp van het woord dan laad het programma niet bloem2 maar een nieuw woord.
hieronder een stukje code:
If c = 0 Then
Select Case pic
Case "bloem1"
PictureBox1.Image = My.Resources.bloem2
Case "bloem2"
PictureBox1.Image = My.Resources.bloem3
Case "bloem3"
PictureBox1.Image = My.Resources.bloem4
Case "bloem4"
PictureBox1.Image = My.Resources.bloem5
Case "bloem5"
PictureBox1.Image = My.Resources.bloem6
Case "bloem6"
PictureBox1.Image = My.Resources.bloem7
Case "bloem7"
PictureBox1.Image = My.Resources.bloem8
MessageBox.Show("Helaas je hebt verloren")
End Select
btnNewGame.PerformClick()
End If
-
Jan 15th, 2012, 05:38 AM
#2
Re: galgje foutmelding picturebox
Welcome to VBForums 
This is an English speaking site, so please post in English even if it takes more effort.
For the benefit of others, this is what Google Translate says the text in the first post contains:
I wanted for my students at school a hangman so that our own words in a fun way to practice, I followed a tutorial on the Internet http://visualstudiotutorials.blogspo...n-game-in.html
This is a very good explanation.
It only goes wrong when I did not use the hangman pictures but my own pictures bloem1.jpg, bloem2.jpg, etc. bloem3.jpg
I get no error message only when I type a wrong letter of the word, then load the program bloem2 but a new word.
a piece of code below:
-
Jan 15th, 2012, 08:59 AM
#3
Re: galgje foutmelding picturebox
Als ik naar de handleiding kijk, dan moet je "btnNewGame.PerformClick()" direct onder Messagebox.Show plaatsen.
By looking at the tutorial, you need to put "btnNewGame.PerformClick()" right after Messagebox.Show...
vb.net Code:
Case "bloem7"
PictureBox1.Image = My.Resources.bloem8
MessageBox.Show("Helaas je hebt verloren")
btnNewGame.PerformClick()
End Select
-
Jan 18th, 2012, 04:16 PM
#4
Thread Starter
New Member
Re: galgje foutmelding picturebox
Thanks, but i doesn`t work.
i start over at the begin
Thanks for your help.
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
|