hallo,
hab da nen kleinen bildschirmschoner, der so im test funktioniert,
in der vorschau funktioniert,
aber beim bildschirmschoneraufruf nur minimiert geöffnet wird.
Woran liegt das???
Code:
Public Sub fViewString()
Dim iChooseString As Integer
Randomize
iChooseString = Int(6 * Rnd + 1)
If iChooseString = 1 Then
Label2.Caption = „text“
ElseIf iChooseString = 2 Then
Label2.Caption = „KFtext“
ElseIf iChooseString = 3 Then
Label2.Caption = „text“
ElseIf iChooseString = 4 Then
Label2.Caption = „text“
ElseIf iChooseString = 5 Then
Label2.Caption = „text“
Else
Label2.Caption = „text“
End If
End Sub
Private Sub Form_Load()
Image1.Picture = Img(0).Picture
Form1.Width = Screen.Width
Form1.Height = Screen.Height
Label2.Top = (Screen.Height / 5) - (Label2.Height / 5)
Label2.Left = (Screen.Width / 2) - (Label2.Width / 2)
Call fViewString
End Sub
Private Sub Timer1_Timer()
Static sTmpX, sTmpY, n As Integer
Static bXDir As Boolean
Static bYDir As Boolean
Randomize
If bYDir Then sTmpY = sTmpY + 100 * Int((5 * Rnd) + 1) Else sTmpY = sTmpY - 100 * Int((4 * Rnd) + 1)
Randomize
If bXDir Then sTmpX = sTmpX + 100 * Int((3 * Rnd) + 1) Else sTmpX = sTmpX - 100 * Int((6 * Rnd) + 1)
If sTmpY > Screen.Height - 1500 Then
bYDir = False
n = n + 1
If n = 1 Then
Image1.Picture = Img(0).Picture
Label1.Caption = „11text“
Label2.ForeColor = QBColor(Rnd * 10)
Call fViewString
ElseIf n = 5 Then
Image1.Picture = Img(1).Picture
Label1.Caption = „11text“
Label2.ForeColor = QBColor(Rnd * 10)
Call fViewString
ElseIf n = 10 Then
Image1.Picture = Img(2).Picture
Label1.Caption = „11text“
Label2.ForeColor = QBColor(Rnd * 10)
Call fViewString
ElseIf n = 15 Then
n = 0
End If
End If
If (n = 1 Or n = 5 Or n = 10) Then Timer1.Interval = 300 Else Timer1.Interval = 150
If sTmpY Screen.Width - 1000 Then bXDir = False
If sTmpX 2 Then
End
Else
iCount = iCount + 1
End If
End Sub