Problem in Tray Pop Up (C#)

Hello everyone,
I'm creating program for File Monitoring using "FileSystemWatcher" class (Winforms C#).
The purpose is for notifying user with message box whenever there was some folder/file creation,
then i tried to use tray pop up for display the message, (i downloaded from http://www.codeproject.com/useritems/adsstraypopup.asp).
But the Tray Pop up won't run when was called in my File Monitoring program. (I separated those 2 files - Tray Popup & Filewatcher)

These are snippets of my programs
public void OnCreated(object ob, FileSystemEventArgs arg)
{
//showTrayPopUp(arg.FullPath + " Created"); --> doesn't work
MessageBox.Show(arg.FullPath + " Created");
}
private void showTrayPopUp(string msgStr)
{
popUpWnd1.Width = Convert.ToInt32(300);
popUpWnd1.Height = Convert.ToInt32(80);
popUpWnd1.opacity = Convert.ToInt32(75);
popUpWnd1.BottomColor = Color.LightSkyBlue;
popUpWnd1.TopColor = Color.DodgerBlue;
popUpWnd1.ShowWindow(msgStr, "Information");
}

My Questions are:
1. Why does it happen In case I used message box for displaying a message when method onCreated triggered it was run,
but if i changed by showing TrayPopUp it wasn't.

2. How can we know about the owner of file (using C#)




Answer this question

Problem in Tray Pop Up (C#)

  • Fernando Velásquez

    There's no way to tell the owner of a c# file from the file alone. CodeProject has information on the author of each sample and discussions for the samples. Please try to find out what's wrong using one of those venues.
  • Problem in Tray Pop Up (C#)