How do you make a picture that you click on make a message box come up and then when you click ok it will close the program?????????????????
Printable View
How do you make a picture that you click on make a message box come up and then when you click ok it will close the program?????????????????
put your picture in a picture box or image control
in the click event put your msg
msgbox "Sorry, it's closing time"
unload me
You want to make a MessageBox come up when you click on a Picture? Use this code.
Put it in the Click event of the PictureBox.
Code:Private Sub Picture1_Click()
RV = MsgBox("Press OK to end", vbOKOnly + vbExclamation, "MyProg")
End
End Sub
can you put a picture in a message box?
i dont think so, but you can make your own Message box, just add a form, and resize it, and then change the property ShowInTaskBar to False, then add any pics you want in it, and a command button and in the event Click for the command button add this word:
End
thats it, but how to show this for, let us say it has the name Form2, then in the Click event of the picture in the main for add the following line:
Form2.show 1
That's it