Select Categories Below
Advertisement
Start Your Own Q&A Site
Create your own Q&A site easily, allowing you to quickly grow a new community around any subject matter or generate new organic traffic for your existing website.
Status: Closed Points: 75 Time: 06:13 - Mar 01, 2007
dustPuppy
I'm programming my first windows .net application in C# and I need to show an error alert, similar to the alert in javascript in web applications. I tried with ShowDialog, but it requires a windows form to show as far as i understand. Isn't there something more simple, like the web counterpart?
Categories:
Add Categories
When adding more than one category, separate them with commas.
rcastagna
Date:: Mar 01, 2007
Time:: 07:59
Hey, dust...venturing out past the web world, I see! (It's a dark, scary world out there...turn back while there's still hope!) Seriously, though...if you're looking for something like the javascript alert() or confirm() take a look at MessageBox.Show in your windows form. Here's some sample code that will give you a messagebox with your typical OK/Cancel buttons like a javascript confirm(): DialogResult dlgRes = null dlgRes = MessageBox.Show( "Are you sure you want to close without saving the document", "Confirm Document Close", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question); if(dlgRes == DialogResult.Yes) { Application.Exit(); } There are other ENUM combinations available for the buttons in MessageBoxButtons so you should be able to tailor and trap the user's response as necessary. I hope this helps... Ric
Time:: 08:02
great, exactly what I was looking for... your the man, ric :)
Date:: Mar 02, 2007
Time:: 14:04
Hey, dust...just wanted to see if that worked for you and to gently remind you to award the points, if appropriate. :) Ric
Date:: Mar 23, 2007
Time:: 15:11
sorry about that Ric, i forgot to close the question. here are the points...
Prajith
Date:: Jul 24, 2007
Time:: 13:05
Hi, Using MessageBox itself you can show alert. You can even have custom images on your MessageBox MessageBox.Show("Your Alert Message", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
roshantechline
Date:: Feb 08, 2010
Time:: 02:30
Sir i am student,i am doing work a project,sir my problem how automatic timing alert in winform,plz help me Thanks
siddhuchauhan30
Date:: Oct 16, 2010
Time:: 06:53
You can use NotifyIcon fro Showing Alert in Window Application.
Question Answered
This question has been closed, and points have been rewarded to the following experts:
You're welcome however to comment or give additional information or if you wish, you have the ability to write a Tutorial in the Tutorial Area.
Answer this Question
New User
Email:
Upon submission of this form, you will automatically be registered as a Quomon user and we will send your login information to this address
Registered User
Username:
Password:
Forgot Your Password?
Enter your email address below and we will resend your login information to you.
Login Information Sent
Questions
Hi is there a way to retrieve the loop count in XSLT
how do repair this problem: every times i opened my laptop it will suddenly n...
How i get the hp pavilion dv6-3054tx laptop bottom base assembly as a sparepa...
I don't have AOL browser but privacy scan shows hundreds of files/cookies fro...
wireless keyboard has stopped working
need validation controller for textbox in java
You have 100 characters to use
Rank
Expert
Points
1.
10279
2.
6493
3.
5596
4.
4848
5.
3487
6.
2840
7.
2770
8.
2303
9.
1820
10.
917
Register today to share your knowledge with the community and be recognized and rewarded for your contributions.
Register Here
"Psst, Quomon is a great site. Pass it on." Tell a Friend | Link To Us | Save to Delicious | Digg it
Language Options
English:
Español:
Sponsors
Questions and Answers Software