image handling

drfjm

Member
Licensed User
Longtime User
Hello,
I try to run a small application I wrote in VB and NSB also in this basic.
A main problem that the "DiamondQueen" cannot be declared, according
to the manual because it is an "active object". Does anybody know how to
make available to the program the existence of the diamond queen?
the code i try to run follows:
'Activity module
Sub Process_Globals
' DiamondQueen.Bitmap = LoadBitmap(File.DirAssets, "k12.bmp")
'DiamondQueen As ImageView=k12.bmp

End Sub

Sub Globals

DiamondQueen As ImageView
End Sub

Sub Activity_Create(FirstTime As Boolean)

' Sub showbtn_OnEvent()
'show image
DiamondQueen.visible=True
End Sub
'
Private Sub DiamondQueen_OnEvent()
DiamondQueen.X = 300
DiamondQueen.Y = 200
End Sub
'
Private Sub movebtn_OnEvent()
'move image
DiamondQueen.X = 400
DiamondQueen.Y = 150
End Sub
'
Private Sub exitbtn_OnEvent()
End
End Sub

(adaped from VB)

Your help will be appreciated.
 
Last edited:

kickaha

Well-Known Member
Licensed User
Longtime User
To start with, in Sub Globals you need
B4X:
Dim DiamondQueen As ImageView
Not just
B4X:
DiamondQueen As ImageView

Also, when you post code please use the code tags as it makes it much easier to read.
 
Upvote 0
Top