Microsoft Small Basic

Program Listing: FRL397
'###############################################################################
'# https://www.casimages.com/f.php?f=180503124211507683.txt #
'###############################################################################
'# Link to download the image files. Rename (F2) Image.txt> Image.zip #
'# Then extract in the folder of this program. Without these image files the program can not work properly #
'###############################################################################
'# Lien pour télécharger les fichiers image. Renommer (F2) Image.txt > Image.zip. #
'# Puis extraire dans le dossier de ce programme. #
'# Sans ces fichier image le se programme ne peut fonctionner correctement #
'###############################################################################
GraphicsWindow.Title = " Aide pour ** Chaos Su Do Ku **"
GraphicsWindow.BackgroundColor = "LightCyan"
GraphicsWindow.MouseUp = ClikSouris
GraphicsWindow.KeyUp = TouchClavier
GraphicsWindow.Width = 716
GraphicsWindow.Height = 617
GraphicsWindow.FontName = "Tahoma"
GraphicsWindow.BrushColor = GraphicsWindow.BackgroundColor
GraphicsWindow.FillRectangle(0, 0, GraphicsWindow.Width, GraphicsWindow.Height)
GraphicsWindow.BrushColor = "Black"'
'Déclaration Des Couleur De Chaque Région Numéroté De 0 a 8
Coul = "0=#FFA3B1;1=#E5AA7A;2=#6DD926;3=#AA8855;4=#D3F9BC;5=#9DBB61;6=#99D9EA;7=#709AD1;8=#B5A5D5"
Cr = Text.GetCharacter(13)
Chemin = Program.Directory + "\"
' The following line could be harmful and has been automatically commented.
' W = File.GetFiles(Chemin)
If (Text.IsSubText(W, "chk01.bmp") <> "True") Then
W = "Les fichers :" + Cr + " chk01.bmp" + Cr + " chk03.bmp" + Cr + "Doivent être dans le même répetoire que cet executable"
GraphicsWindow.ShowMessage(W,"Erreur : Fichier Introuvable")
Program.End()
EndIf
W = ""
optAction[0] = ImageList.LoadImage(Chemin + "chk03.bmp")
optAction[1] = ImageList.LoadImage(Chemin + "chk01.bmp")
TexteOpt = "0=Valeur Définitive;1=Supprimer une valeur possible;2=Surligner case restante"
GraphicsWindow.PenColor = "yellow"
For i = 0 To 80
Stabilo[i] = Shapes.AddEllipse(34, 38)
Shapes.HideShape(Stabilo[i])
Shapes.SetOpacity(Stabilo[i], 75)
EndFor
' Bouton " ? " pour fournir explication sur le déroulement du programme
cmdAide = Controls.AddButton(" ? ", GraphicsWindow.Width - 55, 20)
Controls.SetSize(cmdAide, 35, 35)
cmdIndice = Controls.AddButton("Recherche évidence", 519, 420)
Controls.HideControl(cmdIndice)
cmdCachePossible = Controls.AddButton("Cacher Possible", 519, 460)
Controls.SetSize(cmdCachePossible, 132, 26)
Controls.HideControl(cmdCachePossible)
cmdNouveau = Controls.AddButton("Nouvelle Grille", 519, 500)
Controls.HideControl(cmdNouveau)
Controls.SetSize(cmdNouveau, 132, 26)
Controls.ButtonClicked = ClikBouton
Main()
Sub Main
ChxOpt = 0
Etape = "Saisie Region"' variable comprenant le suivis des étapes du pregramme pour la gestion des événement
ChoixCoulPaver = 0'variable déterminant la couleur de région en cours de saisie
PointCoul = "White" 'variable recevant la couleur du pixel cliquer
CacherPossible = "False"
Larg = 48
Haut = 56
GraphicsWindow.FontSize = 16
For i = 0 To 9
GraphicsWindow.FillRectangle(20 , i * Haut + 20, 434, 2)
GraphicsWindow.FillRectangle(i * Larg + 20, 20, 2, 506)
EndFor
' The following line could be harmful and has been automatically commented.
' If Text.IsSubText(File.GetFiles(Chemin), "CoulGri.txt") Then 'Partie en Cours
' The following line could be harmful and has been automatically commented.
' MemoGrilCoul = File.ReadLine(Chemin + "CoulGri.txt", 1)
' The following line could be harmful and has been automatically commented.
' MaxCoup = File.ReadLine(Chemin + "CoulGri.txt", 2)
' The following line could be harmful and has been automatically commented.
' TabGri = File.ReadLine(Chemin + "StockCoup.txt", MaxCoup)
EnCours = MaxCoup
InitEtapeSaisieChiffre()
Else' demarre normalement
GraphicsWindow.DrawText(100, 552,"Délimiter les 9 régions de la grille")
GraphicsWindow.DrawImage(ImageList.LoadImage(Chemin + "CoulRegion.bmp"), 500, 179)
GraphicsWindow.SetPixel(0,0,"yellow")
GraphicsWindow.Show()
'initialise la Grille
For i = 0 to 8
CoulExiste[i] = 0
For a = 0 To 8
MemoGrilCoul[i][a] = -1
MemoGrilCoul[i][a] = -1
TabGri[i][a][0] = 0
For b = 1 To 9
TabGri[i][a][b] = 1
EndFor
EndFor
EndFor
GriX = 0' position X de la case de la grille en cours de traitement
GriY = 0' position Y de la case de la grille en cours de traitement
EndIf
EndSub
'################################## Gestion évenenment Souris #####################################################
Sub ClikSouris
If w = "Première Fois" Then
w = ""
EndIf
If Shapes.GetLeft(Stabilo[0]) > 0 Then
EffaceStabilo()
EndIf
xSou = GraphicsWindow.MouseX
ySou = GraphicsWindow.MouseY
PointCoul = GraphicsWindow.GetPixel(xSou,ySou)
If Etape = "Saisie Region" Then
If (xSou > 501) And (xSou < 662) And (ySou > 180) And (ySou < 365) Then 'Test Clik sur Zone Boitier Couleur
If (PointCoul <> "LightCyan") And (PointCoul <> "#DCDCDC") Then 'Test que la couleur du clic n'est pas celle du cadre ou du fond
GraphicsWindow.PenColor = "#DCDCDC"
GraphicsWindow.DrawRectangle(Math.Remainder(ChoixCoulPaver , 3) * 57 + 501, Math.Floor(ChoixCoulPaver / 3) * 65 + 180, Larg, Haut)
ChoixCoulPaver = Math.Floor((ySou - 181)/ 65) * 3 + Math.Floor((xSou - 502) / 57)' Mémorise la Couleur Choisi
GraphicsWindow.PenColor = "Black"
If CoulExiste[ChoixCoulPaver] = 9 Then
GraphicsWindow.PenColor = "Red"
EndIf
GraphicsWindow.DrawRectangle(Math.Remainder(ChoixCoulPaver , 3) * 57 + 501, Math.Floor(ChoixCoulPaver / 3) * 65 + 180, Larg, Haut)
EndIf
ElseIf (xSou > 21) And (xSou < 452) And (ySou > 21) And (ySou < 524) Then 'Test Clik sur Zone Grille
GriX = Math.Floor((xSou - 22 ) / Larg)
GriY = Math.Floor((ySou - 22 ) / Haut)
If MemoGrilCoul[GriX][GriY] <> -1 Then ' Test Si Case Grille Est Déjà Attribué A Une Région
MemoGrilCoul[GriX][GriY] = -1 ' Effacer Couleur Mémoriser En GriX, GriY
i = 0
While Coul[i] <> PointCoul ' Cherche Quelle Couleur De La Case Est A Supprimer
i = i + 1
EndWhile
CoulExiste[i] = CoulExiste[i] - 1
GraphicsWindow.BrushColor = "LightCyan"
GraphicsWindow.FillRectangle(GriX * Larg + 22, GriY * Haut + 22, 46, 54)
GraphicsWindow.PenColor = "Black"
GraphicsWindow.DrawRectangle(Math.Remainder(ChoixCoulPaver , 3) * 57 + 501, Math.Floor(ChoixCoulPaver / 3) * 65 + 180, Larg, Haut)
Else'Clic Sur Case vierge
If CoulExiste[ChoixCoulPaver] <> 0 Then'test si case de même couleur existe
' Test que la case fait partie d'un * BLOC * n'étant pas la première de cette coukeur
If (MemoGrilCoul[GriX - 1][GriY] = ChoixCoulPaver) Or (MemoGrilCoul[GriX + 1][GriY] = ChoixCoulPaver) Or (MemoGrilCoul[GriX][GriY - 1] = ChoixCoulPaver) Or (MemoGrilCoul[GriX][GriY +1] = ChoixCoulPaver) Then
If CoulExiste[ChoixCoulPaver] < 9 Then 'Test que le bloc-région ne comporte pas déjà 9 cases
DesEtMemoCoulGri()
If CoulExiste[ChoixCoulPaver] = 9 Then
W = GraphicsWindow.PenColor
GraphicsWindow.PenColor = "Red"
GraphicsWindow.DrawRectangle(Math.Remainder(ChoixCoulPaver , 3) * 57 + 501, Math.Floor(ChoixCoulPaver / 3) * 65 + 180, Larg, Haut)
GraphicsWindow.PenColor = W
EndIf
Else
GraphicsWindow.ShowMessage(" Une Région est Constituer de 9 cases" ," Erreur : Maximum De Cases D'une Région Atteint")
EndIf
Else
GraphicsWindow.ShowMessage(" Les Cases D'une Région Doivent Former Un Bloc" ," Erreur : disposition incorrect")
EndIf
Else'ajoute couleur directement étant première case de région
DesEtMemoCoulGri()
EndIf
'Test grille fini
i = 0
While CoulExiste[i] = 9
i = i + 1
EndWhile
If i = 9 Then ' saisie des régions terminer
MaxCoup = 1 'variable pour getion lecture Fichier StockCoup
' The following line could be harmful and has been automatically commented.
' w = File.WriteLine(Chemin + "CoulGri.txt", 1, MemoGrilCoul)
' The following line could be harmful and has been automatically commented.
' w = File.WriteLine(Chemin + "CoulGri.txt", 2, MaxCoup)
' The following line could be harmful and has been automatically commented.
' w = File.WriteLine(Chemin + "StockCoup.txt", MaxCoup, TabGri)
InitEtapeSaisieChiffre()
EndIf
EndIf
EndIf
ElseIf Etape = "Saisie Chiffre" Then
If (xSou > 21) And (xSou < 452) And (ySou > 21) And (ySou < 524) Then 'Test Clik sur Zone Grille
GriX = Math.Floor((xSou - 22 ) / Larg)
GriY = Math.Floor((ySou - 22 ) / Haut)
DesCaseActiveJaune()
ElseIf (xSou > 480) And (xSou < 689) And (ySou > 118) And (ySou < 215) Then 'Test Clik sur Zone frame effet
ChxOpt = Math.Floor((ySou - 119) / 32)
GestionAfficheOptAction()
EndIf
EndIf
EndSub
'################################### Gestion évenenment Clavier ############################################
Sub TouchClavier
If w = "Première Fois" Then
w = ""
EndIf
If Shapes.GetLeft(Stabilo[0]) > 0 Then
EffaceStabilo()
EndIf
If Etape = "Saisie Chiffre" Then
Touche = GraphicsWindow.LastKey
If Touche = "Left" Then
GriX = GriX - 1
If GriX = -1 Then
GriX = 8
EndIf
DesCaseActiveJaune()
ElseIf Touche = "Up" Then
GriY = GriY - 1
If GriY = -1 Then
GriY = 8
EndIf
DesCaseActiveJaune()
ElseIf Touche = "Right" Then
GriX = GriX + 1
If GriX = 9 Then
GriX = 0
EndIf
DesCaseActiveJaune()
ElseIf Touche = "Down" Then
GriY = GriY + 1
If GriY = 9 Then
GriY = 0
EndIf
DesCaseActiveJaune()
ElseIf Text.StartsWith(Touche, "NumPad") Then ' getion des chiffre taper au clavier
Num = Text.GetSubText(Touche, 7, 1)
If ChxOpt = 2 Then'Surligne les case contenant num comme possible
GraphicsWindow.PenColor = "Black"
GraphicsWindow.DrawRectangle (GriX * Larg + 21, GriY * Haut + 21, Larg, Haut) 'dessine contour actuel Jaune en Noir
i = 0
For a = 0 To 8
For b = 0 To 8
If TabGri[a][b][Num] = 1 Then
Shapes.Move(Stabilo[i], a * Larg + 28, b * Haut + 29)
Shapes.ShowShape(Stabilo[i])
i = i + 1
EndIf
EndFor
EndFor
If i > 0 Then
GraphicsWindow.DrawEllipse(561, 290, Larg, Haut)
GraphicsWindow.BrushColor = 0
GraphicsWindow.FontSize = 34
GraphicsWindow.DrawText(574, 296, Num)
EndIf
ElseIf TabGri[GriX][GriY][Num] = 1 Then ' test existant de Num dans les possible de la case
If ChxOpt = 0 Then 'mettre chiffre la casse
TabGri[GriX][GriY][0] = Num ' Case a désormais valeur de nim
Region = MemoGrilCoul[GriX][GriY] 'mémorise l'appartenace de la case a sa région
For a = 0 to 8
TabGri[a][GriY][Num] = 0' supprime Num de ligne GriY
TabGri[GriX][a][Num] = 0' supprime Num de colonne GriX
TabGri[GriX][GriY][a + 1] = 0' supprime les possibles de la case GriX,GriY
For b = 0 to 8
If MemoGrilCoul[a][b] = Region Then ' si la case a,b est de la même région
TabGri[a][b][Num] = 0 ' supprime Num de la case région
EndIf
endfor
EndFor
Else' supprimer chiffre des possibilité
TabGri[GriX][GriY][Num] = 0
Des_Chiffre()
EndIf
DesGrille()
'MaxCoup et EnCours servent de repére pour se déplacer dans les coup effectuer, cela permet de revoir l'évolution de la résolution de la grille en cas de doute ou d'erreur
'MaxCoup est le nombre total d'action faite, EnCours lui est toujours égal si on ne fait que saisir des chiffres
'EnCour ne différe de MaxCoup quand lui étant inférieur, les coup vont de 1 à MaxCoup et Encours est compris dans cet interval en cas retour a un coup précédent
If MaxCoup = EnCours Then
MaxCoup = MaxCoup + 1 ' l'enregistrement des coup continu normalement
Else
MaxCoup = EnCours + 1 'en retour a été effectuer, l'enregistrement reprend a partir de ce point
EndIf
EnCours = MaxCoup' une saise de chiffre étant effectuer Encour redevien égal de MaxCoup
' The following line could be harmful and has been automatically commented.
' w = File.WriteLine(Chemin + "CoulGri.txt", 2, MaxCoup)
' The following line could be harmful and has been automatically commented.
' w = File.WriteLine(Chemin + "StockCoup.txt", MaxCoup, TabGri)
Else' traitement message d''erreur de saisie de Num
If ChxOpt = 0 Then 'mettre chiffre la casse
GraphicsWindow.ShowMessage(" La valeur de cette case ne peut être " + Num + ".", "Erreur : Saisie Chiffre")
Else' supprimer chiffre des possibilité
GraphicsWindow.ShowMessage(Num + " ne fait déjà plus partis des possibles de cette case.", "Erreur : Supprimer une possiblité")
EndIf
EndIf
ElseIf (Touche = "Subtract") And (EnCours > 1) Then
EnCours = EnCours - 1
' The following line could be harmful and has been automatically commented.
' TabGri = File.ReadLine(Chemin + "StockCoup.txt", EnCours)
DesGrille()
ElseIf (Touche = "Add") And (EnCours < MaxCoup) Then
EnCours = EnCours + 1
' The following line could be harmful and has been automatically commented.
' TabGri = File.ReadLine(Chemin + "StockCoup.txt", EnCours)
DesGrille()
EndIf
EndIf
EndSub
'####################################### Gestion Bouton ##### #################################################
Sub ClikBouton
If Controls.LastClickedButton = "Button1" Then 'Bouton Aide
If Etape = "Saisie Region" Then
w = "Cliquez sur une case blanche de la grille pour l'affecter a la région de la couleur sélectionner" + Cr + Cr
w = w + "Cliquez sur une case coloré de la grille pour annuler son affectation" + Cr + Cr
w = w + "Cliquez sur une couleur de la palette a droite de la grille pour changer de région"
GraphicsWindow.ShowMessage(w, " Aide : Délimitation des régions")
ElseIf Etape = "Saisie Chiffre" Then
w = "Fléche directionnelle ou clique souris pour déplacer la case active cercler en jaune" + Cr + Cr
w = w + "Chiffre du pavé numérique pour réaliser " + Text.GetCharacter(34) +"l'effet" + Text.GetCharacter(34) + " sélectionner" + Cr + Cr
w = w + "Touche - et + pour visionner ou revenir a une étape de votre cheminement"
GraphicsWindow.ShowMessage(w, " Aide : Résolution de la grille")
EndIf
ElseIf Controls.LastClickedButton = "Button2" Then 'Bouton Recherche indice
Resultat = "Non"' pour éviter plusieurs réponse d'affiler si le cas se présente
For a = 0 To 8' test simple si une seule possibilité dans une case
For b = 0 To 8
NbFois = 0
For i = 1 To 9
NbFois = NbFois + TabGri[a][b][i]
EndFor
If NbFois = 1 then
VS ="0=" + (a * Larg + 21) + ";1=" + (b * Haut + 21) + ";2=" + Larg + ";3=" + Haut + ";4=Case"
w = "Case C" + (a + 1) + " - L" + (b + 1) + " na plus qu'une seule possibilité."
CaseBlanche()
EndIf
EndFor
EndFor
If Resultat = "Non" Then
For i = 1 To 9 'Passe en revus les 9 chiffre
For b = 0 To 8' test lIgne si un chiffre peux aller dans une seule case
NbFois = 0
For a = 0 To 8
NbFois = NbFois + TabGri[a][b][i]
EndFor
If NbFois = 1 Then
VS ="0=" + 21 + ";1=" + (b * Haut + 21) + ";2=" + (Larg * 9) + ";3=" + Haut + ";4=Ligne"
w = "Numéro " + i + " de L" + (b + 1) + " na qu'un emplacement posssible"
CaseBlanche()
EndIf
EndFor
If Resultat = "Non" Then
For a = 0 To 8' test Colonne si un chiffre peux aller dans une seule case
NbFois = 0
For b = 0 To 8
NbFois = NbFois + TabGri[a][b][i]
EndFor
If NbFois = 1 Then
VS ="0=" + (a * Larg + 21) + ";1=" + 21 + ";2=" + Larg + ";3=" + (Haut * 9) + ";4=Colonne"
w = "Numéro " + i + " de C" + (a + 1) + " na qu'un emplacement posssible"
CaseBlanche()
EndIf
EndFor
EndIf
EndFor
If Resultat = "Non" Then
For Region = 0 To 8
NbFois = ""
For a = 0 To 8' test Région si un chiffre peux aller dans une seule case
For b = 0 To 8
For i = 1 To 9
If MemoGrilCoul[a][b] = Region Then
NbFois[i] = NbFois[i] + TabGri[a][b][i]
EndIf
EndFor
EndFor
EndFor
For i = 1 To 9
If NbFois[i] = 1 Then
For a = 0 To 8' recherche la case de la région pour permettre un affiche
For b = 0 To 8
If (MemoGrilCoul[a][b] = Region) And (TabGri[a][b][i] = 1) Then
VS ="0=" + (a * Larg + 21) + ";1=" + (b * Haut + 21) + ";2=" + Larg + ";3=" + Haut + ";4=Région"
w = "Au niveau Région, le numéro " + i + " ne peut être que dans la case C" + (a + 1) + " - L" + (b + 1) + "."
CaseBlanche()
Region = 8
EndIf
EndFor
EndFor
EndIf
EndFor
EndFor
NbFois = ""
EndIf
EndIf
If Resultat = "Oui" Then
For i = 0 To 9
GraphicsWindow.FillRectangle(20 , i * Haut + 20, 434, 2)
GraphicsWindow.FillRectangle(i * Larg + 20, 20, 2, 506)
EndFor
DesCaseActiveJaune()
ElseIf w = "Première Fois" Then
w = ""
EndIf
ElseIf Controls.LastClickedButton = "Button3" Then 'Bouton Cacher possible
If w = "Première Fois" Then
w = ""
EndIf
CacherPossible = "True"
DesGrille()
ElseIf Controls.LastClickedButton = "Button4" Then 'Bouton Nouvelle Grille
If w = "Première Fois" Then
If Shapes.GetLeft(Stabilo[0]) > 0 Then
EffaceStabilo()
EndIf
Controls.HideControl(cmdIndice)
Controls.HideControl(cmdCachePossible)
Controls.HideControl(cmdNouveau)
' The following line could be harmful and has been automatically commented.
' File.DeleteFile(Chemin + "CoulGri.txt")
' The following line could be harmful and has been automatically commented.
' File.DeleteFile(Chemin + "StockCoup.txt")
GraphicsWindow.BrushColor = GraphicsWindow.BackgroundColor
GraphicsWindow.FillRectangle(0, 0, GraphicsWindow.Width, GraphicsWindow.Height)
GraphicsWindow.BrushColor = "Black"'
Main()
Else
w = "Attention ! les Données de la grille seront perdu" + Cr + Cr + " - Appuyer une 2eme sur se bouton pour confirmer"
w = w + Cr + Cr + " - Ou reprennez le cours de votre partie pour continuer"
GraphicsWindow.ShowMessage(w, " Nouvelle Grille")
w = "Première Fois"
EndIf
EndIf
EndSub
'#########################################################################################################
Sub Des_Chiffre
GraphicsWindow.BrushColor = Coul[MemoGrilCoul[GriX][GriY]]
GraphicsWindow.FillRectangle(GriX * Larg + 22, GriY * Haut + 22, 46, 54)
GraphicsWindow.BrushColor = "Black"
If (TabGri[GriX][GriY][0] = 0) Then
If CacherPossible = "False" Then
GraphicsWindow.FontSize = 16
For i = 0 to 8
If TabGri[GriX][GriY][i + 1] = 1 Then 'écrit le chiffre s'il existe
GraphicsWindow.DrawText((GriX * Larg) + (Math.Remainder(i, 3) * 15) + 25, (GriY * Haut) + (Math.Floor(i / 3) * 16) + 23, i + 1)
EndIf
EndFor
EndIf
Else
GraphicsWindow.FontSize = 34
GraphicsWindow.DrawText(GriX * Larg + 34, GriY * Haut + 27, TabGri[GriX][GriY][0])
EndIf
EndSub
'#########################################################################################################
Sub DesEtMemoCoulGri
MemoGrilCoul[GriX][GriY] = ChoixCoulPaver ' Mémorise lL'appartenance De La Casse A Une Région
CoulExiste[ChoixCoulPaver] = CoulExiste[ChoixCoulPaver] + 1 ' Agrémente le Nombre De Cases De Cette Région
GraphicsWindow.BrushColor = Coul[ChoixCoulPaver]
GraphicsWindow.FillRectangle(GriX * Larg + 22, GriY * Haut + 22, 46, 54)
EndSub
'#########################################################################################################
Sub DesCaseActiveJaune
GraphicsWindow.PenColor = "Black"
GraphicsWindow.DrawRectangle (AncGriX * Larg + 21, AncGriY * Haut + 21, Larg, Haut) 'dessine contour actuel Jaune en Noir
GraphicsWindow.PenColor = "yellow" '
GraphicsWindow.DrawRectangle (GriX * Larg + 21, GriY * Haut + 21, Larg, Haut) 'dessine contour nouvelle position en jaune
AncGriX = GriX
AncGriY = GriY
EndSub
'#########################################################################################################
Sub InitEtapeSaisieChiffre
For GriX = 0 to 8' Affiche toutes les solutions possible pour chaque case de la grille
For GriY = 0 To 8
Des_Chiffre()
EndFor
EndFor
' Préparation de la fenetre pour l'étape suivante
GraphicsWindow.BrushColor = GraphicsWindow.BackgroundColor
GraphicsWindow.FillRectangle(460, 160, 250, 340) 'efface palette couleur
GraphicsWindow.FillRectangle(20, 540, 430, 70) 'efface texte dessous grille
GraphicsWindow.FontSize = 16
GraphicsWindow.BrushColor = "Black"
GraphicsWindow.DrawText(56 552,"Saisissez les chiffres pour résoudre la grille")
GestionAfficheOptAction()
GriX = 0
GriY = 0
GraphicsWindow.PenColor = "yellow"
GraphicsWindow.DrawRectangle (GriX * Larg + 21, GriY * Haut + 21, Larg, Haut)
AncGriX = GriX 'mémorise position actuelle de GriX
AncGriY = GriY 'mémorise position actuelle de GriY
Controls.ShowControl(cmdIndice)
Controls.ShowControl(cmdCachePossible)
Controls.ShowControl(cmdNouveau)
Etape = "Saisie Chiffre"' cette zone d'événement souris deviens obselète
CoulExiste = ""
GraphicsWindow.Show()
EndSub
'#########################################################################################################
Sub DesGrille
For GriX = 0 to 8
For GriY = 0 To 8
Des_Chiffre()
EndFor
EndFor
GriX = AncGriX
GriY = AncGriY
CacherPossible = "False"
EndSub
'#########################################################################################################
Sub GestionAfficheOptAction
GraphicsWindow.DrawImage(optAction[0], 476, 105)
GraphicsWindow.DrawImage(optAction[1], 484, ChxOpt * 32 + 130)
GraphicsWindow.BrushColor = 0
GraphicsWindow.FontSize = 12
GraphicsWindow.DrawText(504, ChxOpt * 32 + 128, TexteOpt[ChxOpt])
GraphicsWindow.FontSize = 16
EndSub
'#########################################################################################################
Sub EffaceStabilo
DesCaseActiveJaune()
For i = 0 To 80
Shapes.HideShape(Stabilo[i])
EndFor
Shapes.Move(Stabilo[0], 0, 0)
GraphicsWindow.BrushColor = GraphicsWindow.BackgroundColor
GraphicsWindow.FillRectangle(560, 280, Larg + 20, Haut + 20) 'efface numero cercler
EndSub
'#########################################################################################################
Sub CaseBlanche
GraphicsWindow.PenColor = "Black"
GraphicsWindow.DrawRectangle (GriX * Larg + 21, GriY * Haut + 21, Larg, Haut)
GraphicsWindow.PenColor = "White"
GraphicsWindow.DrawRectangle (VS[0], VS[1], VS[2], VS[3])
GraphicsWindow.ShowMessage(w, VS[4] + " a possibilité unique")
Resultat = "Oui"
i = 9 'i, a et b au max permet de fermer tout les boucles for, équivalent de ExitFor sur VB6
a = 8
b = 8
VS = ""
EndSub