Click here to Skip to main content
15,892,005 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# launches another program Pin
ipstefan8-Jan-09 0:15
ipstefan8-Jan-09 0:15 
GeneralRe: C# launches another program Pin
HosamAly8-Jan-09 5:38
HosamAly8-Jan-09 5:38 
QuestionForcina a space or suppressing zeroes in Data Grid Pin
Vanq20097-Jan-09 7:53
Vanq20097-Jan-09 7:53 
AnswerRe: Forcina a space or suppressing zeroes in Data Grid Pin
Henry Minute7-Jan-09 9:08
Henry Minute7-Jan-09 9:08 
QuestionRe: Forcina a space or suppressing zeroes in Data Grid Pin
Vanq20097-Jan-09 10:38
Vanq20097-Jan-09 10:38 
AnswerRe: Forcina a space or suppressing zeroes in Data Grid Pin
Henry Minute7-Jan-09 11:02
Henry Minute7-Jan-09 11:02 
GeneralRe: Forcina a space or suppressing zeroes in Data Grid Pin
Vanq20098-Jan-09 2:02
Vanq20098-Jan-09 2:02 
QuestionFileSystemWatcher Events Fired Twice Pin
#realJSOP7-Jan-09 5:58
mve#realJSOP7-Jan-09 5:58 
Given the following code:

FileSystemWatcher m_watcher = new FileSystemWatcher();

private void MyMethod()
{
	m_watcher.BeginInit();
	m_watcher.Filter				= "*myfile*.*";
	m_watcher.IncludeSubdirectories			= false;
	m_watcher.Path					= "C:\\MyEwatchedFolder";
	m_watcher.NotifyFilter				= NotifyFilters.LastWrite;
	m_watcher.Changed				+= new FileSystemEventHandler(watcher_Changed);
	m_watcher.EndInit();

	m_watcher.EnableRaisingEvents = true;
}

void watcher_Changed(object sender, FileSystemEventArgs e)
{
	FileSystemWatcher watcher = sender as FileSystemWatcher;
	if (e.ChangeType == WatcherChangeTypes.Changed)
	{
		MessageBox.Show(string.Format("File!\n\n{0}", e.FullPath));
	}
}


The Changed handler is getting called twice. I've looked all over googkle and can't find a reason or a way to fix it.


"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001


AnswerRe: FileSystemWatcher Events Fired Twice Pin
Dave Kreskowiak7-Jan-09 6:15
mveDave Kreskowiak7-Jan-09 6:15 
GeneralRe: FileSystemWatcher Events Fired Twice Pin
#realJSOP7-Jan-09 6:43
mve#realJSOP7-Jan-09 6:43 
GeneralRe: FileSystemWatcher Events Fired Twice Pin
Dave Kreskowiak7-Jan-09 8:01
mveDave Kreskowiak7-Jan-09 8:01 
GeneralRe: FileSystemWatcher Events Fired Twice Pin
Luc Pattyn7-Jan-09 6:25
sitebuilderLuc Pattyn7-Jan-09 6:25 
GeneralRe: FileSystemWatcher Events Fired Twice Pin
#realJSOP7-Jan-09 6:42
mve#realJSOP7-Jan-09 6:42 
GeneralRe: FileSystemWatcher Events Fired Twice Pin
Luc Pattyn7-Jan-09 6:49
sitebuilderLuc Pattyn7-Jan-09 6:49 
AnswerRe: FileSystemWatcher Events Fired Twice Pin
Not Active7-Jan-09 7:06
mentorNot Active7-Jan-09 7:06 
AnswerRe: FileSystemWatcher Events Fired Twice Pin
Jason C Bourne7-Jan-09 10:47
Jason C Bourne7-Jan-09 10:47 
QuestionStore Key / Value Pair Pin
mark_w_7-Jan-09 5:32
mark_w_7-Jan-09 5:32 
AnswerRe: Store Key / Value Pair Pin
S. Senthil Kumar7-Jan-09 5:47
S. Senthil Kumar7-Jan-09 5:47 
GeneralRe: Store Key / Value Pair Pin
mark_w_7-Jan-09 5:52
mark_w_7-Jan-09 5:52 
Questionretrieving the last increment value in a table Pin
bfis1081377-Jan-09 4:22
bfis1081377-Jan-09 4:22 
AnswerRe: retrieving the last increment value in a table Pin
Wendelius7-Jan-09 4:25
mentorWendelius7-Jan-09 4:25 
GeneralRe: retrieving the last increment value in a table Pin
bfis1081377-Jan-09 4:26
bfis1081377-Jan-09 4:26 
GeneralRe: retrieving the last increment value in a table Pin
Wendelius7-Jan-09 4:30
mentorWendelius7-Jan-09 4:30 
GeneralRe: retrieving the last increment value in a table Pin
Dave Kreskowiak7-Jan-09 6:07
mveDave Kreskowiak7-Jan-09 6:07 
QuestionRead a Webpage content. Pin
AksharRoop7-Jan-09 4:13
AksharRoop7-Jan-09 4:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.