Mon programme de tablature

Description

Il vous suffit tous simplement de déziper le prog et de le lancer.
Ce serait simpa de me dire ce que vous en penser.
Le code est vachement long !!
Si vous savez ecrire plus simplement le code merci de me le dire.

e-mail : bassman64@multimania.com

Source / Exemple :


Private Sub Command1_Click()
Text7.Text = Text7.Text & Text1.Text
Text8.Text = Text8.Text & Text2.Text
Text9.Text = Text9.Text & Text3.Text
Text10.Text = Text10.Text & Text4.Text
Text11.Text = Text11.Text & Text5.Text
Text12.Text = Text12.Text & Text6.Text
If Text1.Text = "" Then
Let Text7.Text = Text7.Text & "--"
End If
If Text2.Text = "" Then
Let Text8.Text = Text8.Text & "--"
End If
If Text3.Text = "" Then
Let Text9.Text = Text9.Text & "--"
End If
If Text4.Text = "" Then
Let Text10.Text = Text10.Text & "--"
End If
If Text5.Text = "" Then
Let Text11.Text = Text11.Text & "--"
End If
If Text6.Text = "" Then
Let Text12.Text = Text12.Text & "--"
End If
If Command1.Value = True Then Command2.Enabled = True
End Sub

Private Sub Command3_Click()
Select Case Len(Text7.Text)
Case 0
MsgBox "Rien a supprimer..."
Case 1, 2
Text7.Text = ""
Case Is > 2
Text7.Text = Left(Text7.Text, Len(Text7.Text) - 1)
End Select

Select Case Len(Text8.Text)
Case 0
MsgBox "Rien a supprimer..."
Case 1, 2
Text8.Text = ""
Case Is > 2
Text8.Text = Left(Text8.Text, Len(Text8.Text) - 1)
End Select

Select Case Len(Text9.Text)
Case 0
MsgBox "Rien a supprimer..."
Case 1, 2
Text9.Text = ""
Case Is > 2
Text9.Text = Left(Text9.Text, Len(Text9.Text) - 1)
End Select

Select Case Len(Text10.Text)
Case 0
MsgBox "Rien a supprimer..."
Case 1, 2
Text10.Text = ""
Case Is > 2
Text10.Text = Left(Text10.Text, Len(Text10.Text) - 1)
End Select

Select Case Len(Text11.Text)
Case 0
MsgBox "Rien a supprimer..."
Case 1, 2
Text11.Text = ""
Case Is > 2
Text11.Text = Left(Text11.Text, Len(Text11.Text) - 1)
End Select

Select Case Len(Text12.Text)
Case 0
MsgBox "Rien a supprimer..."
Case 1, 2
Text12.Text = ""
Case Is > 2
Text12.Text = Left(Text12.Text, Len(Text12.Text) - 1)
End Select
End Sub

Private Sub Command4_Click()
Text7.Text = Text7.Text & "--"
Text8.Text = Text8.Text & "--"
Text9.Text = Text9.Text & "--"
Text10.Text = Text10.Text & "--"
Text11.Text = Text11.Text & "--"
Text12.Text = Text12.Text & "--"
End Sub

Private Sub Command5_Click()
Select Case Len(Text7.Text)
Case 0
MsgBox "Rien a supprimer..."
Case 1, 2
Text7.Text = ""
Case Is > 2
Text7.Text = Left(Text7.Text, Len(Text7.Text) - 2)
End Select

Select Case Len(Text8.Text)
Case 0
MsgBox "Rien a supprimer..."
Case 1, 2
Text8.Text = ""
Case Is > 2
Text8.Text = Left(Text8.Text, Len(Text8.Text) - 2)
End Select

Select Case Len(Text9.Text)
Case 0
MsgBox "Rien a supprimer..."
Case 1, 2
Text9.Text = ""
Case Is > 2
Text9.Text = Left(Text9.Text, Len(Text9.Text) - 2)
End Select

Select Case Len(Text10.Text)
Case 0
MsgBox "Rien a supprimer..."
Case 1, 2
Text10.Text = ""
Case Is > 2
Text10.Text = Left(Text10.Text, Len(Text10.Text) - 2)
End Select

Select Case Len(Text11.Text)
Case 0
MsgBox "Rien a supprimer..."
Case 1, 2
Text11.Text = ""
Case Is > 2
Text11.Text = Left(Text11.Text, Len(Text11.Text) - 2)
End Select

Select Case Len(Text12.Text)
Case 0
MsgBox "Rien a supprimer..."
Case 1, 2
Text12.Text = ""
Case Is > 2
Text12.Text = Left(Text12.Text, Len(Text12.Text) - 2)
End Select
End Sub

Private Sub Command6_Click()
Text7.Text = "--"
Text8.Text = "--"
Text9.Text = "--"
Text10.Text = "--"
Text11.Text = "--"
Text12.Text = "--"
End Sub

Private Sub Command7_Click()
Text7.Text = Text7.Text & "|"
Text8.Text = Text8.Text & "|"
Text9.Text = Text9.Text & "|"
Text10.Text = Text10.Text & "|"
Text11.Text = Text11.Text & "|"
Text12.Text = Text12.Text & "|"
End Sub

Private Sub Form_Load()
Text7.Text = "--"
Text8.Text = "--"
Text9.Text = "--"
Text10.Text = "--"
Text11.Text = "--"
Text12.Text = "--"
If Option1.Value = False Then Command1.Enabled = False
If Option1.Value = False Then Command3.Enabled = False
If Option1.Value = False Then Command4.Enabled = False
If Command1.Value = False Then Command2.Enabled = False
If Option1.Value = False Then Command5.Enabled = False
If Option1.Value = False Then Command7.Enabled = False
If Command1.Value = False Then Command6.Enabled = False
If Option1.Value = False Then Text7.Enabled = False
If Option1.Value = False Then Text8.Enabled = False
If Option1.Value = False Then Text9.Enabled = False
If Option1.Value = False Then Text10.Enabled = False
If Option1.Value = False Then Text11.Enabled = False
If Option1.Value = False Then Text12.Enabled = False

End Sub

Private Sub Option1_Click()
If Option1.Value = True Then Text13.Text = "e |"
If Option1.Value = True Then Text14.Text = "B |"
If Option1.Value = True Then Text15.Text = "G |"
If Option1.Value = True Then Text16.Text = "D |"
If Option1.Value = True Then Text17.Text = "A |"
If Option1.Value = True Then Text18.Text = "E |"
If Option1.Value = True Then Text19.Text = "e |"
If Option1.Value = True Then Text20.Text = "B |"
If Option1.Value = True Then Text21.Text = "G |"
If Option1.Value = True Then Text22.Text = "D |"
If Option1.Value = True Then Text23.Text = "A |"
If Option1.Value = True Then Text24.Text = "E |"
If Option1.Value = False Then Text13.Text = ""
If Option1.Value = True Then Text12.Enabled = True
If Option1.Value = True Then Text11.Enabled = True
If Option1.Value = True Then Text7.Enabled = True
If Option1.Value = True Then Text8.Enabled = True
If Option1.Value = True Then Text9.Enabled = True
If Option1.Value = True Then Text10.Enabled = True
If Option1.Value = True Then Command1.Enabled = True
If Option1.Value = True Then Command3.Enabled = True
If Option1.Value = True Then Command4.Enabled = True
If Option1.Value = True Then Command5.Enabled = True
If Option1.Value = True Then Command6.Enabled = True
If Option1.Value = True Then Command7.Enabled = True
If Option1.Value = True Then Text5.Enabled = True
If Option1.Value = True Then Text6.Enabled = True
End Sub

Private Sub Option2_Click()
If Option2.Value = True Then Text13.Text = "E |"
If Option2.Value = True Then Text14.Text = "A |"
If Option2.Value = True Then Text15.Text = "D |"
If Option2.Value = True Then Text16.Text = "G |"
If Option2.Value = True Then Text17.Text = ""
If Option2.Value = True Then Text18.Text = ""
If Option2.Value = True Then Text19.Text = "E |"
If Option2.Value = True Then Text20.Text = "A |"
If Option2.Value = True Then Text21.Text = "D |"
If Option2.Value = True Then Text22.Text = "G |"
If Option2.Value = True Then Text23.Text = ""
If Option2.Value = True Then Text24.Text = ""
If Option2.Value = True Then Text12.Enabled = False
If Option2.Value = True Then Text11.Enabled = False
If Option2.Value = True Then Command1.Enabled = True
If Option2.Value = True Then Command3.Enabled = True
If Option2.Value = True Then Command4.Enabled = True
If Option2.Value = True Then Command5.Enabled = True
If Option2.Value = True Then Command6.Enabled = True
If Option2.Value = True Then Command7.Enabled = True
If Option2.Value = True Then Text7.Enabled = True
If Option2.Value = True Then Text8.Enabled = True
If Option2.Value = True Then Text9.Enabled = True
If Option2.Value = True Then Text10.Enabled = True
If Option2.Value = True Then Text5.Enabled = False
If Option2.Value = True Then Text6.Enabled = False
End Sub

Conclusion :


On m'as demandé de mettre le code...

Codes Sources

A voir également

Vous n'êtes pas encore membre ?

inscrivez-vous, c'est gratuit et ça prend moins d'une minute !

Les membres obtiennent plus de réponses que les utilisateurs anonymes.

Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.

Le fait d'être membre vous permet d'avoir des options supplémentaires.