sub imgUser_Click
onoff = True
Dim Intent As Intent
Intent.Initialize(Intent.ACTION_PICK, "")
Intent.SetType("image/*")
Intent.PutExtra("crop", "true") 'crop ON
Intent.PutExtra("aspectX", 1) 'crop aspects
Intent.PutExtra("aspectY", 1) 'crop aspects
Intent.PutExtra("outputX", 100) 'crop size
Intent.PutExtra("outputY", 100) 'crop size
Intent.PutExtra("output", ParseUri("file://" & File.Combine(File.DirRootExternal, "temp.jpg")))
StartActivity(Intent)
end sub
Sub Activity_Resume
If onoff = True Then
'Verification si photo exist
If File.Exists(File.DirRootExternal, "temp.jpg") Then
onoff = False
imgUser.Bitmap = LoadBitmap(File.DirRootExternal, "temp.jpg")
End If
End If
End Sub