Aide VB6

riganemed Messages postés 11 Date d'inscription jeudi 3 décembre 2009 Statut Membre Dernière intervention 3 juin 2011 - 1 mai 2011 à 15:49
riganemed Messages postés 11 Date d'inscription jeudi 3 décembre 2009 Statut Membre Dernière intervention 3 juin 2011 - 2 mai 2011 à 12:02
salut !
SVP aidez moi a configurer cette interface !

5 réponses

cs_Jack Messages postés 14006 Date d'inscription samedi 29 décembre 2001 Statut Modérateur Dernière intervention 28 août 2015 79
1 mai 2011 à 16:14
D'accord.
0
NSUADI Messages postés 540 Date d'inscription mardi 4 août 2009 Statut Membre Dernière intervention 1 février 2013 2
1 mai 2011 à 18:00
Ce qui compte,ce n'est pas ce qu'on a mais plutôt ce que l'on fait avec ce qu'on a...

Visual Basic .Net is the best
and vb6.0
0
riganemed Messages postés 11 Date d'inscription jeudi 3 décembre 2009 Statut Membre Dernière intervention 3 juin 2011
1 mai 2011 à 23:13
Desole puisque j'ai pas inserer le code a corriger pour remplir MSHFlexgrid!

Private Sub AddNew_Click()

Dim s As String
Dim sRow As Integer

s = MsgBox("Are You Sure", vbQuestion + vbYesNo, "Save...")
If s = vbNo Then Exit Sub

sRow = MSHFlexGrid1.Rows + 1
MSHFlexGrid1.Rows = sRow
MSHFlexGrid1.TextMatrix(sRow - 1, 0) = sRow - 1


MSHFlexGrid1.TextMatrix(sRow - 1, 1) = TXT_PRES.Text
MSHFlexGrid1.TextMatrix(sRow - 1, 2) = TXT_TIME.Text
TXT_PRES.Text = ""
TXT_TIME.Text = ""




MsgBox "Data Has Saved Successfully", vbInformation, "Saved"


End Sub



Private Sub Command1_Click()
Dim s As String
s = MsgBox("Are You Sure", vbQuestion + vbYesNo, "Save...")
If s = vbNo Then Exit Sub
Dim sRow As Integer
sRow = MSHFlexGrid1.Rows + 1
MSHFlexGrid1.Rows = sRow
MSHFlexGrid1.TextMatrix(sRow - 1, 0) = sRow - 1


MSHFlexGrid1.TextMatrix(sRow - 1, 1) = "END"
End Sub

Private Sub EDIT_Click()
If (MSHFlexGrid1.Row = 0) Then
' A = MsgBox("Impossible de modifier la ligne", vbCritical, "Erreur")

ElseIf (TXT_PRES.Text Empty Or TXT_PRES.Text Empty) Then
A = MsgBox("Un des champs desiré est vide donc impossible de modifier la ligne", vbCritical, "Erreur")
Else
MSHFlexGrid1.TextMatrix(MSHFlexGrid1.Row, 1) = TXT_PRES.Text
MSHFlexGrid1.TextMatrix(MSHFlexGrid1.Row, 2) = TXT_TIME.Text
TXT_PRES.Text = ""
TXT_TIME.Text = ""
End If

End Sub

Private Sub DELETE_Click()
If MSHFlexGrid1.Rows = 1 Then Exit Sub
If MSHFlexGrid1.Rows 2 And MSHFlexGrid1.Row 1 Then
MSHFlexGrid1.Rows = 1
MSHFlexGrid1.Row = MSHFlexGrid1.Row - 1
Exit Sub
End If
MSHFlexGrid1.RemoveItem MSHFlexGrid1.Row



End Sub

Private Sub EXIT_Click()
Dim p As String
p = MsgBox("Are You Sure To Exit", vbQuestion + vbYesNo, "Exit...")
If p = vbNo Then Exit Sub
End
End Sub

Private Sub Form_Load()
MSHFlexGrid1.TextMatrix(0, 0) = "Step n°"
MSHFlexGrid1.TextMatrix(0, 1) = "Pressure"
MSHFlexGrid1.TextMatrix(0, 2) = "Time"

'MSHFlexGrid1.Rows = MSHFlexGrid1.Rows + 5

End Sub
0
cs_Jack Messages postés 14006 Date d'inscription samedi 29 décembre 2001 Statut Modérateur Dernière intervention 28 août 2015 79
2 mai 2011 à 08:43
-1- Quand on colle du code, on utilise la coloration syntaxique (3ème icône à droite) pour faciliter la lecture
-2- On explique un tout petit peu le problème ET ce qu'on a essayé
0

Vous n’avez pas trouvé la réponse que vous recherchez ?

Posez votre question
riganemed Messages postés 11 Date d'inscription jeudi 3 décembre 2009 Statut Membre Dernière intervention 3 juin 2011
2 mai 2011 à 12:02
Pardons!Je suis desolé pour ces fautes !
L'application consiste a inserer les 2 champs time & Pressure au MSHFlexgrid "sans BD" je veut juste les inserer a la grid .Voici une capture d'cran de mon interface "http://www.imageupload.org/?d=4DBDC25B1" .
Je veut inserer le lignes en les numerotant a travers la 1er colonne:"STEP N°"
ensuite en supprimant une ligne selectionné la numérotation se décremente ,ainsi que la numérotrotation de chaque ligne qui suivent .

Private Sub AddNew_Click()

Dim s As String
Dim sRow As Integer

s = MsgBox("Are You Sure", vbQuestion + vbYesNo, "Save...")
If s = vbNo Then Exit Sub

sRow = MSHFlexGrid1.Rows + 1
MSHFlexGrid1.Rows = sRow
MSHFlexGrid1.TextMatrix(sRow - 1, 0) = sRow - 1


MSHFlexGrid1.TextMatrix(sRow - 1, 1) = TXT_PRES.Text
MSHFlexGrid1.TextMatrix(sRow - 1, 2) = TXT_TIME.Text
TXT_PRES.Text = ""
TXT_TIME.Text = ""




MsgBox "Data Has Saved Successfully", vbInformation, "Saved"


End Sub



Private Sub Command1_Click()
Dim s As String
s = MsgBox("Are You Sure", vbQuestion + vbYesNo, "Save...")
If s = vbNo Then Exit Sub
Dim sRow As Integer
sRow = MSHFlexGrid1.Rows + 1
MSHFlexGrid1.Rows = sRow
MSHFlexGrid1.TextMatrix(sRow - 1, 0) = sRow - 1


MSHFlexGrid1.TextMatrix(sRow - 1, 1) = "END"
End Sub

Private Sub EDIT_Click()
If (MSHFlexGrid1.Row = 0) Then
' A = MsgBox("Impossible de modifier la ligne", vbCritical, "Erreur")

ElseIf (TXT_PRES.Text Empty Or TXT_PRES.Text Empty) Then
A = MsgBox("Un des champs desiré est vide donc impossible de modifier la ligne", vbCritical, "Erreur")
Else
MSHFlexGrid1.TextMatrix(MSHFlexGrid1.Row, 1) = TXT_PRES.Text
MSHFlexGrid1.TextMatrix(MSHFlexGrid1.Row, 2) = TXT_TIME.Text
TXT_PRES.Text = ""
TXT_TIME.Text = ""
End If

End Sub

Private Sub DELETE_Click()
If MSHFlexGrid1.Rows = 1 Then Exit Sub
If MSHFlexGrid1.Rows 2 And MSHFlexGrid1.Row 1 Then
MSHFlexGrid1.Rows = 1
MSHFlexGrid1.Row = MSHFlexGrid1.Row - 1
Exit Sub
End If
MSHFlexGrid1.RemoveItem MSHFlexGrid1.Row



End Sub

Private Sub EXIT_Click()
Dim p As String
p = MsgBox("Are You Sure To Exit", vbQuestion + vbYesNo, "Exit...")
If p = vbNo Then Exit Sub
End
End Sub

Private Sub Form_Load()
MSHFlexGrid1.TextMatrix(0, 0) = "Step n°"
MSHFlexGrid1.TextMatrix(0, 1) = "Pressure"
MSHFlexGrid1.TextMatrix(0, 2) = "Time"

'MSHFlexGrid1.Rows = MSHFlexGrid1.Rows + 5

End Sub 
0
Rejoignez-nous