Option Explicit Dim S As String Private Sub Timer1_Timer() Dim N As Integer Static T As String Static NDX As Integer If Len(T) 0 Then T Space$(Len(S)) N = Len(S) NDX = (NDX Mod N) + 1 Mid$(T, 1, Len(S) - 1) = Mid$(T, 2, Len(S) - 1) Mid$(T, Len(S), 1) = Mid$(S, NDX, 1) Label1.Caption = T End Sub Private Sub Form_Load() Dim a As Integer S = "Sélectionnez les informations que vous souhaitez rendre visibles dans votre profil. " With Label1 .Visible = False .AutoSize = True .Caption = S a = .Width .AutoSize = False .Move (Me.Width - a) / 2 .Caption = "" .Visible = True End With With Timer1 .Interval = 200 .Enabled = True End With End Sub
Option Explicit Dim S As String Private Sub Timer1_Timer() Static N As Integer If N < Len(S) Then N = N + 1 Label1.Caption = Label1.Caption & Mid(S, N, 1) Else Label1.Caption = Mid(Label1.Caption, 2) & Left(Label1.Caption, 1) End If End Sub Private Sub Form_Load() Dim a As Integer S = "Sélectionnez les informations que vous souhaitez rendre visibles dans votre profil. " With Label1 .Visible = False .AutoSize = True .Caption = S a = .Width .AutoSize = False .Move (Me.Width - a) / 2 .Caption = "" .Visible = True End With With Timer1 .Interval = 200 .Enabled = True End With End Sub
vers la gauche Label1.Caption=Label1.Caption & " " 'vers la droite Label1.Caption=" " & Label1.Caption
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionJe souhaiterais faire une genre de
Code Visual Basic :
<marquee></marquee>
mais en VB6, pouvez-vous m'aider s'il vous plaît ?
Option Explicit Dim S As String Private Sub Timer1_Timer() Dim N As Integer Static T As String Static NDX As Integer If Len(T) 0 Then T Space$(20) N = Len(S) NDX = (NDX Mod N) + 1 Mid$(T, 1, 19) = Mid$(T, 2, 19) Mid$(T, 20, 1) = Mid$(S, NDX, 1) Label3 = T End Sub Private Sub Form_Load() S = "Sélectionnez les informations que vous souhaitez rendre visibles dans votre profil." End Sub