Amed » 11.11.2005 (Пт) 20:11
Private Declare Function TextOut Lib "gdi32" Alias "TextOutA" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal lpString As String, ByVal nCount As Long) As Long
Private Declare Function SetTextColor Lib "gdi32" (ByVal hdc As Long, ByVal crColor As Long) As Long
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Sub Command1_Click()
Dim i As Integer
Dim strString As String
Command1.Visible = False
strString = "Ïðèâåò!"
For i = 0 To 100
Form1.BackColor = RGB(0 + i * 2.55, 0 + i * 2.55, 255 - i * 2.55)
Call SetTextColor(hdc, RGB(255 - i * 2.55, 255 - i * 2.55, 0))
Call TextOut(hdc, 5, i * 2, strString, Len(strString))
Sleep 25
Next i
End Sub