
Module içine ;
- Kod: Tümünü seç
Public Declare Function SetTimer Lib "user32" ( _
ByVal hwnd As Long, _
ByVal nIDEvent As Long, _
ByVal uElapse As Long, _
ByVal lpTimerFunc As Long) As Long
Public Declare Function KillTimer Lib "user32" ( _
ByVal hwnd As Long, ByVal nIDEvent As Long) As Long
Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" ( _
ByVal lpClassName As String, _
ByVal lpWindowName As String) As Long
Public hwnd As Long, Cl As Integer, at As Integer
Public Sub Timer(ByVal hwnd As Long, ByVal uMsg As Long, ByVal idEvent As Long, ByVal dwTime As Long)
UserForm1.Caption = Animasyon("Www.ExcelVBA.Net Kod Yazmak Bizim İşimiz ", 3)
UserForm1.CommandButton1.Caption = Animasyon("Www.ExcelVBA.Net Kod Yazmak Bizim İşimiz ", 3)
UserForm1.Label1.Caption = Animasyon("Www.ExcelVBA.Net Kod Yazmak Bizim İşimiz ", 3)
UserForm1.TextBox1.Text = Animasyon("Www.ExcelVBA.Net Kod Yazmak Bizim İşimiz ", 3)
UserForm1.OptionButton1.Caption = Animasyon("Www.ExcelVBA.Net Kod Yazmak Bizim İşimiz ", 3)
End Sub
Public Function Animasyon(str As String, eff As Integer) As String
Dim lop
Cl = Len(str) + 1
at = at + 1
If at >= Cl Then
at = 1
End If
Select Case eff
Case 0 'Sağ
Animasyon = Mid(str, at) + Left(str, at)
Case 1 'Sol
Animasyon = Mid(str, (Cl - at)) + Left(str, (Cl - at))
Case 2 'Orta
Animasyon = Mid(str, (Cl - at)) + Left(str, (Cl - at)) + Mid(str, at) + Left(str, at)
Case 3 'Sağ Sol
Animasyon = Mid(str, at) + Left(str, at) + Mid(str, (Cl - at)) + Left(str, (Cl - at))
End Select
End Function
UserForm kod sayfasına ;
- Kod: Tümünü seç
Private Sub UserForm_Activate()
hwnd = FindWindow(vbNullString, Me.Caption)
SetTimer hwnd, 0, 200, AddressOf Timer
End Sub
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
KillTimer hwnd, 0
End Sub