tags:

views:

224

answers:

3

I want to show a stylish pop up in c# window application if certain condition satisfy.just like in gtalk .actually Iam showing rss feed web page and for every new feed i want to show pop up with some music for notification . So jow can i add audio in this application and play the same on timer tick for certain condition .

+1  A: 
// one way
if( ... )
    MessageBox.Show( ... );

You haven't given me much information to go on, so this is all I can offer.

Charlie Somerville
Not sure if a MessageBox is stylish, but good answer given the lack of information.
kenny
Nice...i'm gonna upvote this one...quid pro quo :)
Abhijeet Patel
+4  A: 

Create your own pop up window:

public class MyStylishPopUp : Form
{
    ...
}

and call it with:

var m = new MyStylishPopUp();
m.ShowDialog();
dkson
+1  A: 

I'd say just create another Windows Form (lets call it StylishForm) and call this form inside the main/starting form by doing something like this:

StylishForm stylishPopUp = new StylishForm(); // where StylishForm = public partial class StylishForm : Form
DialogResult resultOfStylishPopup = stylishPopUp.ShowDialog();
if (resultOfStylishPopup == DialogResult.OK)
{
// Do what you wanna do here
}

The advantage here is - you can do anything on this StylishForm and show any number of controls/text and on the buttons (if you have) you can set the DialogResult to what you want (in this case you are looking for DialogResult.OK so set that just before closing the form and you will receive it here)

BrainCracker