I am trying to toggle the bitmap image of a view. I need to check which bitmap is currently loaded into the view and switch to the other bitmap when the view is clicked. image1.jpg is already loaded and displayed but the if statement is failing. Is there another way of doing ths ? Thanks for any help
Sub ImageView_Click
Dim bm As Bitmap
bm = LoadBitmap(File.DirAssets,"image1.jpg")
If ImageView.Bitmap = bm Then
ImageView.Bitmap = LoadBitmap(File.DirAssets,"image2.jpg")
Else
ImageView.Bitmap = LoadBitmap(File.DirAssets,"image1.jpg")
End If
End Sub
Hamo
Sub ImageView_Click
Dim bm As Bitmap
bm = LoadBitmap(File.DirAssets,"image1.jpg")
If ImageView.Bitmap = bm Then
ImageView.Bitmap = LoadBitmap(File.DirAssets,"image2.jpg")
Else
ImageView.Bitmap = LoadBitmap(File.DirAssets,"image1.jpg")
End If
End Sub
Hamo