housemi Posted May 30, 2003 Posted May 30, 2003 Anyone know how I might cause a form or message box to pop-up when a user hits a button? I'd like the form or box to contain a graphic file (and an OK to close). THANKS Quote
*Experts* Bucky Posted May 30, 2003 *Experts* Posted May 30, 2003 The MessageBox.Show() method pops up a Windows message box with a variety of options, although the only options you have for pictures are the standard Windows ones: error, information, question, etc. If you want a message box with your own graphic, you'll need to make a form and show it by using the ShowDialog() method. Quote "Being grown up isn't half as fun as growing up These are the best days of our lives" -The Ataris, In This Diary
ThePentiumGuy Posted June 10, 2003 Posted June 10, 2003 try displaying a form with the background Image set to the graphic you want, or are you talking about the exclamation icon in MessageBox.Show ? Quote My VB.NET Game Programming Tutorial Site (GDI+, Direct3D, Tetris [coming soon], a full RPG.... you name it!) vbprogramming.8k.com My Project (Need VB.NET Programmers) http://workspaces.gotdotnet.com/ResolutionRPG
ThePentiumGuy Posted June 10, 2003 Posted June 10, 2003 also, add an OK button to ur form and say Unload Me, that closes the program. So, the first thing you want to do is have ur first form up. After some event(key press, buttonpress) u want to pop up the form. what you could do is Hide(form1.hide) the first form, and say form2.Show and on form2 add an OK button that says Unload Me and set the background image to ur graphic file Quote My VB.NET Game Programming Tutorial Site (GDI+, Direct3D, Tetris [coming soon], a full RPG.... you name it!) vbprogramming.8k.com My Project (Need VB.NET Programmers) http://workspaces.gotdotnet.com/ResolutionRPG
*Experts* mutant Posted June 10, 2003 *Experts* Posted June 10, 2003 Unload Me doesnt work, you have to use Me.Close() or whatever your form is called. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.