Soyez le premier à donner votre avis sur cette source.
Vue 5 324 fois - Téléchargée 495 fois
A PLACER DANS LA FORM1 Private Sub Command1_Click() Text1.Text = "" + Dir1 + "\" + File1 + "" End Sub Private Sub Command2_Click() Text2.Text = "" + Dir2 + "\" + File2 + "" End Sub Private Sub Command3_Click() If Text1.Text = "" Or Text2.Text = "" Then MsgBox "Valeures incorrectes", vbOKOnly + vbCritical, "Valeures incorrectes" Else Timer1.Enabled = True Command5.Enabled = True Command3.Enabled = False End If End Sub Private Sub Command4_Click() a = InputBox("Dites le nombre de millisecondes qu'il y aura entre les deux images :") If IsNumeric(a) Then Timer1.Interval = a Timer2.Interval = a Else MsgBox "Ceci n'est pas une valeure numérique", vbOKOnly + vbCritical, "Valeure incorrecte" End If End Sub Private Sub Command5_Click() Timer1.Enabled = False Timer2.Enabled = False Command5.Enabled = False Command3.Enabled = True End Sub Private Sub Command6_Click() If Text1.Text = "" Then MsgBox "Aucune image sélectionnée", vbOKOnly + vbCritical, "Aucune image" Else Form2.Show End If End Sub Private Sub Command7_Click() If Text1.Text = "" Then MsgBox "Aucune image sélectionnée", vbOKOnly + vbCritical, "Aucune image" Else Form3.Show End If End Sub Private Sub Dir1_Change() File1 = Dir1 End Sub Private Sub Dir2_Change() File2 = Dir2 End Sub Private Sub File1_DblClick() Text1.Text = "" + Dir1 + "\" + File1 + "" End Sub Private Sub File2_DblClick() Text2.Text = "" + Dir2 + "\" + File2 + "" End Sub Private Sub Form_Load() End Sub Private Sub Timer1_Timer() selectedfile = File1.Path & "\" & File1.FileName Form1.Image1.Picture = LoadPicture(selectedfile) Timer2.Enabled = True Timer1.Enabled = False End Sub Private Sub Timer2_Timer() selectedfile = File2.Path & "\" & File2.FileName Form1.Image1.Picture = LoadPicture(selectedfile) Timer2.Enabled = False Timer1.Enabled = True End Sub A PLACER DANS LE FORM2 Private Sub Command1_Click() Unload Me End Sub Private Sub Form_Load() selectedfile = Form1.File1.Path & "\" & Form1.File1.FileName Form2.Image1.Picture = LoadPicture(selectedfile) End Sub A PLACER DANS LA FORM3 Private Sub Command1_Click() Unload Me End Sub Private Sub Form_Load() selectedfile = Form1.File2.Path & "\" & Form1.File2.FileName Form3.Image1.Picture = LoadPicture(selectedfile) End Sub
12 nov. 2008 à 15:15
Oula ... Hum ... J'aurais pas fais comme ça ...
Je dirais plutôt comme ça:
Dim ListeFiles() As String 'Tu le rempli de la façon dont tu veux
Dim IndexActu as Integer
Private Sub Form1_Load()
IndexActu = 0
End Sub
Private Sub BoutonMarcheArret_Click()
TonTimer.Enabled = Not TonTimer.Enabled
End Sub
Private Sub TonTimer_Timer()
IndexActu = IndexActu + 1
If IndexActu > UBound(ListeFiles) Then IndexActu = 0
Dim Actu As String
Actu = File1.Path & "" & ListeFiles(IndexActu)
Form1.TaPictureBox.Picture = LoadPicture(Actu)
End Sub
Sur ce ...
À la revoyure
Antho2005
20 juil. 2003 à 16:58
20 juil. 2003 à 16:32
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.