Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.RootPane.LoadLayout("Layout1") 'Load the layout file.
MainForm.Show
Dim st As InputStream = File.OpenInput(File.DirAssets,"1.png")
Dim bytes(st.BytesAvailable) As Byte
st.ReadBytes(bytes,0,st.BytesAvailable)
Dim img As Image
img = BytesToImage(bytes)
ImageView1.SetImage(img)
End Sub
Public Sub BytesToImage(bytes() As Byte) As Image
Dim In As InputStream
In.InitializeFromBytesArray(bytes, 0, bytes.Length)
Dim bmp As Image
bmp.Initialize2(In)
Return bmp
End Sub