Sub Globals
Dim bitmap As Bitmap
' Just because I don't like variable names that are the same as an class name
Dim capturedBitmap as Bitmap
Private ImageView1 As ImageView
End Sub
...............
Sub Button4_Click
'capturedBitmap is a global variable
capturedBitmap=vvvit5.CurrentFrame
If capturedBitmap = Null Then
' This is what we mean by checking to see if the bitmap is null
Log("Bitmap is null")
Else If capturedBitmap.IsInitialized = False Then
' Bitmap may not be null, but un-initialized
Log("Bitmap is not initialized")
Else
' The bitmap should be ok here, since we have a non-null, initialized bitmap
Log("Processing returned bitmap")
ImageView1.Bitmap=capturedBitmap
Dim Out As OutputStream
Out = File.OpenOutput(File.DirRootExternal, "test1.png", False)
capturedBitmap.WriteToStream(Out, 90, "PNG")
Out.Close
End If
End Sub