Tjitte Dijkstra Member Licensed User Longtime User Dec 6, 2014 #1 I try to finish the program by activity.finish, but only after the user gets the possibility to go on. See my code. What did I do wrong? Code: Sub STOP_Click Dim result As Int Msgbox2("You want to stop?","","Go on","","Stop",LoadBitmap(File.DirAssets,"upblack.jpg")) If result = DialogResponse.NEGATIVE Then Activity.finish End Sub
I try to finish the program by activity.finish, but only after the user gets the possibility to go on. See my code. What did I do wrong? Code: Sub STOP_Click Dim result As Int Msgbox2("You want to stop?","","Go on","","Stop",LoadBitmap(File.DirAssets,"upblack.jpg")) If result = DialogResponse.NEGATIVE Then Activity.finish End Sub
DonManfred Expert Licensed User Longtime User Dec 6, 2014 #2 1. Why did you dim an int result? You dont need and you dont USE it. 2. Msgbox2 gives a result. Why are you not using it? Code: If Msgbox2("You want to stop?","","Go on","","Stop", Null) = DialogResponse.NEGATIVE Then Activity.finish End If i set null to the image cause i dont have this file BUT to make your code running you need to write it like this Code: Sub STOP_Click Dim result As Int result = Msgbox2("You want to stop?","","Go on","","Stop",LoadBitmap(File.DirAssets,"upblack.jpg")) If result = DialogResponse.NEGATIVE Then Activity.finish End if End Sub Upvote 0
1. Why did you dim an int result? You dont need and you dont USE it. 2. Msgbox2 gives a result. Why are you not using it? Code: If Msgbox2("You want to stop?","","Go on","","Stop", Null) = DialogResponse.NEGATIVE Then Activity.finish End If i set null to the image cause i dont have this file BUT to make your code running you need to write it like this Code: Sub STOP_Click Dim result As Int result = Msgbox2("You want to stop?","","Go on","","Stop",LoadBitmap(File.DirAssets,"upblack.jpg")) If result = DialogResponse.NEGATIVE Then Activity.finish End if End Sub
Tjitte Dijkstra Member Licensed User Longtime User Dec 6, 2014 #3 Don, Great. I saw the example erverywhere, but overlooked a detail. Upvote 0