Here's a fun little script that was written early on in the development of kf.net - when I was testing-out the graphics ... it was meant to be an "Introduction to Kixforms.Net" script ... not sure how it will play-out on everyones machines (horse-power etc), but give a try...

Code:

Break On

$System = CreateObject("Kixforms.System")

; Options

$BURST = 0 ; 0 = staggered 1 = batch
$TITLE = "Introducing KiXforms.NET"
$TEXT = "KiXforms.NET"

$Form = $System.Form()
$Form.ClientWidth = 500
$Form.ClientHeight = 250
$Form.StartPosition = $System.FormStartPosition_CenterScreen
$Form.FormBorderStyle = $System.FormBorderStyle_FixedDialog
$Form.MaximizeBox = 0
$Form.Font = $System.Font("Helvetica", 36, $System.FontStyle_Bold)
$Form.Text = $TITLE

$PictureBox = $System.PictureBox()
$PictureBox.Dock = $System.DockStyle_Fill
$= $Form.Controls.Add($PictureBox)

$Bitmap = $System.Bitmap.FromSize($PictureBox.Size)

$Graphics = $System.Graphics.FromImage($Bitmap)
$Graphics.Clear($System.Color.Black)

$Brush = $System.SolidBrush($System.Color.Black)
$TextBrush = $System.SolidBrush($System.Color.White)

$PictureBox.Image = $Bitmap

$d = $PictureBox.ClientSize
$numrockets = 8;
$num = 16;

Global $xcoord[$numrockets*$num-1];
Global $ycoord[$numrockets*$num-1];
Global $xspeed[$numrockets*$num-1];
Global $yspeed[$numrockets*$num-1];
Global $count[$numrockets-1];
Global $exploding[$numrockets-1];

For $i = 0 to $numrockets - 1
$count[$i] = 60 + iif($BURST=0,$i * 16, 0)
$exploding[$i] = 1
Next

For $i = 0 to $numrockets * $num - 1
$xcoord[$i] = Cint($System.Math.Random()*$d.width)*8
$ycoord[$i] = $d.height*8
$xspeed[$i] = 0;
$yspeed[$i] = 0;
Next

$Timer = $System.Timer
$Timer.Interval = 1000/24
$Timer.Tick = "TimerTick()"

$Form.Show
$Timer.Start

While $Form.Visible
$= Execute($Form.DoEvents)
Loop

Exit 0

Function TimerTick()

$Graphics.Clear($System.Color.Black)

For $i = 0 to $numrockets - 1

If $exploding[$i] = 0 And $yspeed[$i*$num] > 0
$exploding[$i]=1;
For $j = 0 to $num - 1
$index= $i * $num + $j;
$yspeed[$index] = Cint(($System.Math.Random()*28.0)-15);
$xspeed[$index] = Cint(($System.Math.Random()*31.0)-16);
If $xspeed[$index] >= 0
$xspeed[$index] = $xspeed[$index] + 1
EndIf
Next
EndIf

For $j = 0 to $num - 1
$index = $i * $num + $j;
If $exploding[$i] = 1
Select
Case ($i mod 3) = 0
$color = $System.Color.FromRgb(192,$count[$i]+32,$count[$i]+127)
Case ($i mod 3) = 1
$color = $System.Color.FromRgb($count[$i]+32,192,$count[$i]+127);
Case ($i mod 3) = 2
$color = $System.Color.FromRgb(192, 192, $count[$i]+32);
Case 1
EndSelect
Else
$color = $System.Color.White
EndIf
$br = $System.SolidBrush($color)
$Graphics.FillRectangle($br,$xcoord[$index]/8, $ycoord[$index]/8,3,3);
$xcoord[$index] = $xcoord[$index] + $xspeed[$index];
$ycoord[$index] = $ycoord[$index] + $yspeed[$index];
$yspeed[$index] = $yspeed[$index] + 1;
Next

$count[$i] = $count[$i] - 1;

If $count[$i] = 0
$count[$i] = 128;
$exploding[$i] = 0;
$x=Cint($System.Math.Random()*$d.width)*8/*<<3*/;
$y=$d.height*8
$yspd=Cint(($System.Math.Random()*28)-58);
$xspd=Cint(($System.Math.Random()*15.0)-8);
If $xspd >= 0
$xspd = $xspd + 1;
EndIf
For $j = 0 to $num - 1
$index = $i * $num + $j;
$xcoord[$index] = $x;
$ycoord[$index] = $y;
$xspeed[$index] = $xspd;
$yspeed[$index] = $yspd;
Next
EndIf

Next

$Graphics.DrawString($TEXT, $Form.Font, $TextBrush, 90,90)

$PictureBox.Invalidate()

EndFunction