Sub AppStart (Form1 As Form, Args() As String)
' MainForm = Form1
'MainForm.RootPane.LoadLayout("Layout1") 'Load the layout file.
' MainForm.Show
File.WriteString("D:\", "1.png", "")
Private imv As Image
imv.Initialize("D:\", "1.png")
Private cvs As Canvas
cvs.Initialize("")
cvs.PrefWidth = 100
cvs.PrefHeight = 100
cvs.DrawLine(10, 10, 100, 100, fx.Colors.Red, 2)
imv = cvs.Snapshot
Private Out As OutputStream = File.OpenOutput("D:\", "1.png", False)
imv.WriteToStream(Out)
Out.Close
End Sub