تبلیغات

دفتر اول

cod4u - TypeWriter Effect (code included in post)
--------------------------------------------------------------------------------------------------------------
 
http://iqna.ir/en

TypeWriter Effect (code included in post)

نوشته شده توسط :Mehraan
پنجشنبه 18 خرداد 1391-03:10 ق.ظ

TypeWriter Effect (code included in post)

its pretty simple and staight forward so here it is:

VB Code:


  1. Private Declare Function GetTickCount Lib "kernel32" () As Long
  2. Public Sub TypeWriter(txtt As TextBox, time As Single, text As String)
  3. '^^^ for time you put the amount of seconds you want it to wait
  4. Dim progress As Integer
  5. Dim lastc As Long
  6. progress = 1
  7. lastc = GetTickCount
  8. time = time * 1000
  9. Do While progress <> (Len(text) + 1)
  10. If GetTickCount - lastc > time Then
  11. txtt.text = txtt.text + Mid(text, progress, 1)
  12. txtt.Refresh
  13. progress = progress + 1
  14. lastc = GetTickCount
  15. End If
  16. DoEvents
  17. Loop
  18. End Sub
  19. Private Sub Form_Load()
  20. Me.Show
  21. TypeWriter Text1, 0.5, "Welcome"
  22. End Sub




درباره وبلاگ:



آرشیو:


آخرین پستها:


پیوندهای روزانه:


نویسندگان:


ابر برچسبها:


آمار وبلاگ:


http://cod4u.mihanblog.ir ==========================

کد آهنگ
=====================

کد عروسک مرلین ========================





The Theme Being Used Is MihanBlog Created By ThemeBox