If you go through this SO article, you will understand a little bit about why it is usually not possible to have service and GUI application in same project.
As pointed out in this article at code project, if you want to solve it by using a tray icon application you may follow this article from 2007 and
you may look into using System.IO.FileSystemWatcher fileWatcherService
by setting Path and filter properties according to your need.
fileWatcherService.Path = 'your_folder_path';
fileWatcherService.Filter = "*.*"; //watching all files
fileWatcherService.EnableRaisingEvents = true; //Enable file watcher
when disposing form remember to disable event raising property:
fileWatcherService.EnableRaisingEvents = false;
And, when you need to associate any action, attach event handlers to events like:
public event FileSystemEventHandler Deleted;
public event FileSystemEventHandler Created;
public event FileSystemEventHandler Changed;
public event RenamedEventHandler Renamed;
public event ErrorEventHandler Error;
For example,
fileWatcherService.Created += new System.IO.FileSystemEventHandler(this.fileWatcherService_OnFileCreated);
While,
private void fileWatcherService_OnFileCreated(object sender, FileSystemEventArgs e)
{
//Put your popup action over here
}
You can perform same action for changed, deleted and renamed events by using a reusable common method to invoke popup.