|
Trouver une ressource
Vous ne trouvez pas de réponse à votre problème ? Alors posez la question dans le forum. Souvenez-vous qu'il n'y a jamais de question bête, mais rester dans l'ignorance parce que l'on n'ose pas poser une question, ça c'est une erreur !
PUZZLE V1.0
Information sur la source
Description
Un jeu de puzzle vous choisissez entre les images de votre choix mais n'est pas complet
Source
- Private Sub Command1_Click()
-
- Picture1(19).Picture = Nothing
-
- x1 = 0
- y1 = 0
- x2 = 0
- y2 = 0
- For i = 0 To 18
- Select Case i
- Case 5
- y2 = ty + y2
- x2 = 0
- Case 10
- y2 = ty + y2
- x2 = 0
- Case 15
- y2 = ty + y2
- x2 = 0
- End Select
- Form1.Picture1(i).PaintPicture Form2.Image1(ID).Picture, x1, y1, tx, ty, x2, y2, tx, ty
- x2 = tx + x2
- Next
- For i = 0 To 19
- TP(i, 0) = i
- TP(i, 1) = i
- Next
- MsgBox "Commencez ?", vbQuestion
- For i = 0 To 19
- Randomize
- Rndinx = CInt(Rnd * 18)
- Rndinx2 = CInt(Rnd * 18)
- Picture2.Picture = Picture1(Rndinx).Image
- Picture1(Rndinx).Picture = Picture1(Rndinx2).Image
- Picture1(Rndinx2).Picture = Picture2.Picture
- a = TP(Rndinx2, 1)
- TP(Rndinx2, 1) = TP(Rndinx, 1)
- TP(Rndinx, 1) = a
-
- Next
- End Sub
-
- Private Sub Command2_Click()
- CommonDialog1.ShowOpen
- PictureTest.Picture = LoadPicture(CommonDialog1.FileName, , , 10, 1)
-
- End Sub
-
- Private Sub Form_Load()
- For i = 0 To 19
- Picture1(i).Enabled = False
- Next
- tx = Form1.Picture1(0).Width
- ty = Form1.Picture1(0).Height
- End Sub
-
-
- Private Sub Form_Unload(Cancel As Integer)
- End
- End Sub
-
- Private Sub menuApropos_Click()
- Form3.Show
- End Sub
-
- Private Sub menunewparti_Click()
- Form2.Show
- For i = 0 To 19
- Picture1(i).Enabled = True
- Next
- End Sub
-
- Private Sub menuquitter_Click()
- End
- End Sub
-
- Private Sub Picture1_DragDrop(Index As Integer, Source As Control, X As Single, Y As Single)
-
- If TP(Index, 1) = 19 Then
- Picture2.Picture = Picture1(Inx).Image
- Picture1(Inx).Picture = Picture1(Index).Image
- Picture1(Index).Picture = Picture2.Picture
- a = TP(Index, 1)
- TP(Index, 1) = TP(Inx, 1)
- TP(Inx, 1) = a
- End If
- For i = 0 To 19
- If TP(i, 0) <> TP(i, 1) Then Exit Sub
- Next
- MsgBox "Bravo !"
- End Sub
-
- Private Sub Picture1_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
- Label1.Width = tx
- Label1.Height = ty
- Label1.Move Picture1(Index).Left, Picture1(Index).Top, tx, ty
- Label1.Drag
- Inx = Index
- End Sub
-
Private Sub Command1_Click()
Picture1(19).Picture = Nothing
x1 = 0
y1 = 0
x2 = 0
y2 = 0
For i = 0 To 18
Select Case i
Case 5
y2 = ty + y2
x2 = 0
Case 10
y2 = ty + y2
x2 = 0
Case 15
y2 = ty + y2
x2 = 0
End Select
Form1.Picture1(i).PaintPicture Form2.Image1(ID).Picture, x1, y1, tx, ty, x2, y2, tx, ty
x2 = tx + x2
Next
For i = 0 To 19
TP(i, 0) = i
TP(i, 1) = i
Next
MsgBox "Commencez ?", vbQuestion
For i = 0 To 19
Randomize
Rndinx = CInt(Rnd * 18)
Rndinx2 = CInt(Rnd * 18)
Picture2.Picture = Picture1(Rndinx).Image
Picture1(Rndinx).Picture = Picture1(Rndinx2).Image
Picture1(Rndinx2).Picture = Picture2.Picture
a = TP(Rndinx2, 1)
TP(Rndinx2, 1) = TP(Rndinx, 1)
TP(Rndinx, 1) = a
Next
End Sub
Private Sub Command2_Click()
CommonDialog1.ShowOpen
PictureTest.Picture = LoadPicture(CommonDialog1.FileName, , , 10, 1)
End Sub
Private Sub Form_Load()
For i = 0 To 19
Picture1(i).Enabled = False
Next
tx = Form1.Picture1(0).Width
ty = Form1.Picture1(0).Height
End Sub
Private Sub Form_Unload(Cancel As Integer)
End
End Sub
Private Sub menuApropos_Click()
Form3.Show
End Sub
Private Sub menunewparti_Click()
Form2.Show
For i = 0 To 19
Picture1(i).Enabled = True
Next
End Sub
Private Sub menuquitter_Click()
End
End Sub
Private Sub Picture1_DragDrop(Index As Integer, Source As Control, X As Single, Y As Single)
If TP(Index, 1) = 19 Then
Picture2.Picture = Picture1(Inx).Image
Picture1(Inx).Picture = Picture1(Index).Image
Picture1(Index).Picture = Picture2.Picture
a = TP(Index, 1)
TP(Index, 1) = TP(Inx, 1)
TP(Inx, 1) = a
End If
For i = 0 To 19
If TP(i, 0) <> TP(i, 1) Then Exit Sub
Next
MsgBox "Bravo !"
End Sub
Private Sub Picture1_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
Label1.Width = tx
Label1.Height = ty
Label1.Move Picture1(Index).Left, Picture1(Index).Top, tx, ty
Label1.Drag
Inx = Index
End Sub
Conclusion
Pour + d'information veuillez me contactez sur mon E-Mail : Mouadox@hotmail.com
Fichier Zip
Pour les "Membres Club", vous pouvez télécharger directement un fichier contenu dans le zip sans télécharger le zip en entier !
Télécharger le zip
Sources du même auteur
Sources de la même categorie
Sources en rapport avec celle ci
Commentaires et avis
Discussions en rapport avec ce code source dans le forum
Aide pour petit projet personel [ par GoldMath ]
Bonjour, :p Je souhaite réaliser un petit launcher de mini-jeux (que vous pouvez trouver sur BigFishGames, Reflexive,...). Pour cela j'utilise Micros
images embarquées [ par thefada ]
Salut, je suis en vb.net 2003.Je souhaite afficher un smiley content ou triste, selon le résultat de mon programme. J'aimerais donc inclure dans mon p
imagelist me déforme mes images??? [ par thefada ]
Salut, j'ai une pictureBox dans laquelle trois images différentes vont se succéder au cours de l'exécution de mon programme.Donc, j'ai créé un composa
problème avec les images d'une listview associées à un imagelist [ par fauve ]
Salut, J'ai un petit problème, voilà j'ai une listview où j'affiche les périphériques connectées sur la machine et en fonction du type de périp
VBA afficher une photo jpg [ par jldancet ]
BonjourJ'ai un tableau excel avec des petites images (icones) dans la colonne A et en regard le no de produit en colonne BJ'aimerai en cliquant sur l'
Afficher des bitmaps [ par luna4 ]
Salut,j'ai eu beau chercher sur le site, j'ai pas trouvé de réponses à mon problème.Alors voila, (en vb net) je voudrais afficher sucessivement des im
Liste d'images [ par myannonce2004 ]
Bonjours.J'ai crée une basse de donnée sous access 2003, Permettant géré les inscrire de client Identitié + photo(les photos ev. 3000 sont stockée san
Deux images superposées dans picturebox [ par aliquando ]
Bonjour tout le monde!!voilà je me retrouve confronté à un problême. Je devais obtenir un picturebox contenant une grande image et une petite image su
images en binary [ par CORBnet ]
Bonjour à tous;j'ai 1 code qui marche pas é j'aimerai bien savoir pkoiBref, s'agit d'un code qui copie 2 images :Dim variable As StringOpen App.Path
Comment voir les affichages d'un thread quand lapplication principale est occupée ? [ par Syphou ]
Bonjour, j'ai un problème avec un threadJ'ai une application windows (Fenetre Principale avec des fenetre enfant...) qui communique avec un webservice
|
Téléchargements
Logiciels à télécharger sur le même thème :
|