Автор вопроса: Shark | Web-сайт:www.ma26.ru | ICQ: 284036855
Подскажите какой нибудь эффект для первого окна программы, типа заставки. Какие нибудь летаюшие кружки или еще что. Не мого не чего придумать чтобы всем понравилось
Как вариант. Помести на форму картинку (например логотип программы), лучше *.gif с прозрачным фоном, BackColor формы сделай белым, кинь на форму таймер (Interval =1, Enabled = True). Дальше этот код...
Option Explicit
Private Const GWL_EXSTYLE = (-20)
Private Const WS_EX_LAYERED = &H80000
Private Const LWA_ALPHA = &H2
Private Const LWA_COLORKEY = &H1
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Declare Function SetLayeredWindowAttributes Lib "user32" (ByVal hWnd As Long, ByVal crKey As Long, ByVal bAlpha As Byte, ByVal dwFlags As Long) As Long
 im Ind As Long
 im tInd As Long
Private Sub Form_Click()
frmMain.Visible = True
Unload frmPrompt
End Sub
Private Sub Form_Load()
 im Ret As Long
Ind = 1
Ret = GetWindowLong(Me.hWnd, GWL_EXSTYLE)
Ret = Ret Or WS_EX_LAYERED
SetWindowLong hWnd, GWL_EXSTYLE, Ret
End Sub
Private Sub Timer1_Timer()
tInd = tInd + Ind
If tInd = 254 Then
Ind = -2
ElseIf tInd = 0 Then
Timer1.Enabled = False
frmMain.Show
Unload frmPrompt
Exit Sub
Else
SetLayeredWindowAttributes hWnd, &HFFFFFF, tInd, LWA_COLORKEY Or LWA_ALPHA
End If
End Sub
Или так, на форме метка (AutoSize = True, Index = 0), и таймер
Option Explicit
 im MousLeft As Long
 im MousTop As Long
Private Sub Form_Load()
 im i As Integer
For i = 1 To Len("Это заставка"
If i > 1 Then
Load lblSimbol(i - 1)
With lblSimbol(i - 1)
.Left = lblSimbol(i - 2).Left + lblSimbol(i - 1).Width + 20
.Top = lblSimbol(i - 2).Top
.Caption = Mid("Это заставка", i, 1)
.Visible = True
End With
Else
lblSimbol(i - 1).Caption = Mid("Заставка", i, 1)
lblSimbol(i - 1).Visible = True
End If
Next i
Timer1.Interval = 50
Timer1.Enabled = True
End Sub
Private Sub Timer1_Timer()
MoveSimbol
lblSimbol(0).Left = MousLeft
lblSimbol(0).Top = MousTop
End Sub
Private Sub MoveSimbol()
 im i As Integer
For i = lblSimbol.Count - 1 To 1 Step -1
lblSimbol(i).Move lblSimbol(i - 1).Left + lblSimbol(i - 1).Width + 20, lblSimbol(i - 1).Top
Next i
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
MousLeft = X
MousTop = Y - 240
End Sub