'Activity module
Sub Process_Globals
End Sub
Sub Globals
' declare your image variable which is credits.jpg
Dim creditButtonImage As Bitmap
' tell the compiler you are setting up a button
Dim creditButton As Button
End Sub
Sub Activity_Create(FirstTime As Boolean)
' load the image into memory
creditButtonImage.Initialize(File.DirAssets, "credits.jpg")
'
' load the apps main layout
Activity.LoadLayout("main1")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub creditButton_Click
' here set the creditButton you told the compiler about and call setbackgroundimage with the file you earlier loaded into memory
creditButton.setbackgroundimage(LoadBitmap(File.dirassets,"credits.jpg"))
End Sub