marwakarim
Messages postés40Date d'inscriptionsamedi 27 mars 2010StatutMembreDernière intervention11 juin 2010
-
27 mars 2010 à 18:41
cs_loulou69
Messages postés672Date d'inscriptionmercredi 22 janvier 2003StatutMembreDernière intervention 2 juin 2016
-
18 avril 2011 à 09:50
Svp c urgent j'ai besoin de m'aider dans a comprendre ces code je suis debutante en vb6 c urgenttttttttt
code1:
Private Sub ChangeGrafs_DragDrop(Source As Control, X As Single, Y As Single)
End Sub
Private Sub cmdFirst_Click()
Form3.Show
End Sub
Private Sub cmdPrevious_Click()
statistique.Show
End Sub
Private Sub Command2_Click()
MSChart1.Visible = True
ChangeGrafs.Visible = True
Adodc1.RecordSource = "SELECT brouillé,COUNT (brouillé) From brouillage GROUP BY brouillé"
Adodc1.Refresh
Adodc1.Caption = Adodc1.RecordSource
Adodc1.Recordset.MoveNext
End Sub
code2:*Private Sub DataGrid1_Click()
End Sub
Private Sub dernier_Click()
Adodc1.Recordset.MoveLast
End Sub
Private Sub Image2_Click()
End Sub
Private Sub Image3_Click()
Fermeture.Show
End Sub
Private Sub menu_Click()
FRMMENU.Show
End Sub
Private Sub menuprincipal_Click()
Form3.Show
End Sub
Private Sub précédent_Click()
Adodc1.Recordset.MovePrevious
End Sub
Private Sub premier_Click()
Adodc1.Recordset.MoveFirst
End Sub
Private Sub Quitter_Click()
Fermeture.Show
End Sub
Private Sub suivant_Click()
Adodc1.Recordset.MoveNext
End Sub
code3:
Private Sub cmdFirst_Click()
Form3.Show
End Sub
Private Sub cmdPrevious_Click()
statistique.Show
End Sub
Private Sub Command1_Click()
Adodc1.RecordSource = "SELECT datedeplainte,COUNT (datedeplainte) as nombre_de_interevntion From brouillage GROUP BY datedeplainte"
Adodc1.Refresh
Adodc1.Caption = Adodc1.RecordSource
DataGrid2.Visible = True
End Sub
Private Sub Command2_Click()
Adodc1.RecordSource = "SELECT Brouillé ,COUNT (Brouillé) as nombre_de_reclamation From brouillage GROUP BY Brouillé"
Adodc1.Refresh
Adodc1.Caption = Adodc1.RecordSource
DataGrid3.Visible = True
End Sub
Private Sub DataGrid1_Click()
On Error GoTo err
If IsNull(Me.Adodc1.Recordset!Intervenants) Then
Me.Text4.Text = ""
Else
Me.Text4.Text = (Me.Adodc1.Recordset!Intervenants)
End If
If IsNull(Me.Adodc1.Recordset!Date_intervention) Then
Me.Text2.Text = ""
Else
Me.Text2.Text = (Me.Adodc1.Recordset!Date_intervention)
End If
GoTo fin
err:
MsgBox "Erreur 1"
fin:
End Sub
Private Sub DataGrid1_HeadClick(ByVal ColIndex As Integer)
On Error GoTo err
Select Case ColIndex
Case 1
Me.Adodc1.Recordset.Sort = "[N° de licence]"
Case 2
Me.Adodc1.Recordset.Sort = "[Intervenant]"
End Select
Me.Adodc1.Recordset.Requery
GoTo fin
err:
MsgBox "Erreur 6"
fin:
End Sub
Sub affichage()
On Error Resume Next
Text1 = Adodc1.Recordset.Fields(1)
End Sub
Private Sub Form_Load()
End Sub
code4:
Private Sub Command1_Click()
FRMMENU.Show
End Sub
Private Sub Command4_Click()
Fermeture.Show
End Sub
Private Sub Command3_Click()
statistique.Show
End Sub
Private Sub FondEcran_Click(Index As Integer)
End Sub
Private Sub Image1_Click()
Fermeture.Show
End Sub
code5:
Option Explicit
Dim p As Integer
Public LoginSucceeded As Boolean
Private Sub cmdCancel_Click()
' Affecte la valeur False à la variable globale
' pour indiquer l'échec de la connexion.
'LoginSucceeded = False
'Me.Hide
'Debut.Hide
End
End Sub
Private Sub cmdOK_Click()
' Vérifie si le mot de passe est correct.
If txtPassword "karim" And txtUserName "chaouachi" Then
' Placer le code ici pour signaler
' à la procédure appelante la réussite de la fonction.
' Définir une variable globale est plus facile.
LoginSucceeded = True
Me.Hide
Chargement.Show
Else
If p > 1 Then
JouerLeFichier App.Path + "" & "_ERREUR.WAV"
MsgBox "Mot de passe et/ou Nom Utulisateur non valide(s), réessayez !", , "Connexion"
p = p - 1
Text1.Text = "Il vous rèstes " & p & " essai(s)"
txtPassword.SetFocus
SendKeys "{Home}+{End}"
Else
JouerLeFichier App.Path + "" & "malfound.wav"
MsgBox "Vous n'étes pas autorisez ,L'application doit fermer !", vbCritical, "Connexion"
Me.Hide
Debut.Hide
End If
End If
End Sub
Private Sub FondEcran_Click(Index As Integer)
End Sub
Private Sub Form_Load()
p = 3
Text1.Text = "Vous avez 3 essai(s)"
frmLogin.Visible = False
code6:
Private Sub cmdSort_Click()
Form1.Show
Unload Me
End Sub
Private Sub cmdSort_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Shape1(3).BackColor = &HFF00FF
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Shape1(5).BackColor = &H0&
Shape1(0).BackColor = &H0&
Shape1(1).BackColor = &H0&
Shape1(2).BackColor = &H0&
Shape1(3).BackColor = &H0&
Shape1(4).BackColor = &H0&
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
Label2.Caption = KeyAscii
End Sub
code7:
Private Sub Form_Unload(Cancel As Integer)
Set Splash = Nothing
End Sub
code8:
Private Sub Command1_Click()
Form2.Show
End Sub
Private Sub Command2_Click()
ChangeGraf.Show
End Sub
cs_Jack
Messages postés14006Date d'inscriptionsamedi 29 décembre 2001StatutModérateurDernière intervention28 août 201579 28 mars 2010 à 01:29
BONJOUR
aussi
Et tu crois qu'on va passer une demie-heure à commenter ce code pour toi ?
Faut pas rêver : on n'est pas des professeurs.
Pouyr comprendre ton code, il faudrait déjà qu'on sache ce que représentes les objets comme statistisque ou ChangeGrafs : on ne sait asolument pas de quoi il s'agit.
Si tu arrives à nous expliquer ce que tu cherches à faire à partir de ce code, on pourra peut-être t'aider, mais sans explication du problème, sans analyse, impossible.
Vala
Jack, MVP VB NB : Je ne répondrai pas aux messages privés
Le savoir est la seule matière qui s'accroit quand on la partage (Socrate)