Click here to Skip to main content
15,909,193 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
i have searched a lot on the web to find a way to show popup messages in my c# code but failed. if anybody here can help me i shall be very thankfull to him

what i want to show is something like this
if(x < y)
popup.show("y is greater than x", 500);


and this popup message should close automatically after 500 milliseconds.

Thanking u all in anticipation
Posted

Your best option is probably to make your own little form that will automatically close itself after X amount of time. You can then make it look however you want.

I don't think there's anything in the framework that fits what you want, the closest thing is a regular ol' MessageBox but I doubt that would look to good, and I don't think there's an option to have it without any buttons.

EDIT: Actually, after a quick check and as I thought, you can choose to show a ToolTip wherever and whenever you like, simply by calling myToolTip.Show("some text", this, position, duration);
 
Share this answer
 
v2
They are called tooltips. Google that and you'll find all the info you need.
 
Share this answer
 
Thanks for the reply.

Actually what i am doing is that when my program starts the my programs form goes to back end and the normal working of windows is carried on. If my pointer stop for 2 seconds at some x y position in primary screen the popup should come up and show the x y coordinates of that position.

Any idea how to use tool tip with primary screen??
 
Share this answer
 
Comments
OriginalGriff 6-Jun-10 7:19am    
Don't add an answer to your own question - you are the only person who gets an email for that! Use the "add comment" button to reply to someone's answer, and they get an email (like this one) to let them know. Otherwise, you are just hoping that they look back and see you question.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900