Konfetti-Grafikausgabe auf Formular

ScaleMode, DrawWidth, XPos, YPos
Sub laden()
Dim CX%, CY%, Msg$, XPos%, YPos%
On Error Resume Next
Randomize Zufallsgenerator.
Form2.WindowState = 2
Form2.FontName = "Arial"
ForeColor = Rnd * RGB(Rnd * 255, Rnd * 255, Rnd * 255)  QBColor(4) = Set foreground to red.
FontSize = Rnd * 72 Set point size.
CX = Rnd * ScaleWidth Get horizontal center.
CY = Rnd * ScaleHeight  Get vertical center.
Cls Clear form.
Msg = "  K o n f e t t i   "
CurrentX = CX - TextWidth(Msg) Horizontal position.
CurrentY = CY - TextHeight(Msg) Vertical position.
Print Msg Print message.
Do
 ScaleMode = Rnd * 7 Set ScaleMode to pixels.
 DrawWidth = Rnd * 16   Set DrawWidth.
 XPos = Rnd * ScaleWidth Get horizontal position.
 YPos = Rnd * ScaleHeight * 1.5 Get vertical position.
 PSet (Rnd * XPos * 7, Rnd * YPos * 1.5), _ QBColor(Rnd * 15) = Draw confetti.
    RGB(Rnd * 255, Rnd * 255, Rnd * 255)
 DoEvents Yield to other.
Loop
End Sub
Private Sub Form_Load()
 Form2.Show
 Call laden
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
 Call laden
End Sub
Private Sub Form_Unload(Cancel As Integer)
 End
End Sub

 Ranking-Hits zurück Sitemap
Designed by www.wbrnet.info