private codem as mycodeclass
codem.initilize
select QTR1
case 4
codem.setButtons(false,true,false,false)
case 5
codem.setButtons(false,true,false,true)
end Select
... In the class mycodeclass
private sub setButtons(img1show as boolean, img2show as boolean, img3 as boolean, img4as boolean)
iif(img1show,setImage(imageView1,"led_off.png"),setImage(imageView1,"led_vert.png"))
iif(img2show,setImage(imageView2,"led_off.png"),setImage(imageView2,"led_vert.png"))
iif(img3show,setImage(imageView3,"led_off.png"),setImage(imageView3,"led_vert.png"))
iif(img4show,setImage(imageView4,"led_off.png"),setImage(imageView4,"led_vert.png"))
end sub
private sub setImage(imgv as imageview, img as string)
imgv.bitmap = LoadBitmap(File.dirAssets,img)
end sub