Guys,
I've got a bit of a problem...
I'm using a SystemFileWatcher to watch for new files that get built in a
directory. The problem I have is that the file being written is about 4mb in
size. It's being written from one server to another server the file watcher
is running on. What I've been trying to do is fire off a timer, in the
Change event of the SystemFileWatcher, to try to open the file to see if
it's done being written to or not; catching an exception if not and waiting
for the next tick event. However, the timer will not fire. I've tried
Timer.Start() and Timer.Enabled = True, I've tried both, but to no avail.
Does anyone know if this is a bug or not or if I'm doing this wrong?
Also, I was using the event from the SystemFileWatcher to accomplish the
same task, but occasionally, it wouldn't fire one last time when the file
was completed, so I never could accomplish the task I need to accomplish.
Does anyone have any better ideas on how to accomplish this, or know if you
can use a timer inside the Change event of the SystemFileWatcher class?
Thanks,
Mike 2 2777
"Mike Andrews" <mi***@farpointer.net> schrieb: I'm using a SystemFileWatcher to watch for new files that get built in a directory. The problem I have is that the file being written is about 4mb in size. It's being written from one server to another server the file watcher is running on. What I've been trying to do is fire off a timer, in the Change event of the SystemFileWatcher, to try to open the file to see if it's done being written to or not; catching an exception if not and waiting for the next tick event. However, the timer will not fire. I've tried Timer.Start() and Timer.Enabled = True, I've tried both, but to no avail. Does anyone know if this is a bug or not or if I'm doing this wrong?
Maybe setting the filesystemwachter's 'SynchronizingObject' property to the
form the component is placed on will solve the problem.
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Thanks alot.
That workd!
Later,
Mike
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:um**************@TK2MSFTNGP14.phx.gbl... "Mike Andrews" <mi***@farpointer.net> schrieb: I'm using a SystemFileWatcher to watch for new files that get built in a directory. The problem I have is that the file being written is about
4mb in size. It's being written from one server to another server the file watcher is running on. What I've been trying to do is fire off a timer, in the Change event of the SystemFileWatcher, to try to open the file to see if it's done being written to or not; catching an exception if not and waiting for the next tick event. However, the timer will not fire. I've tried Timer.Start() and Timer.Enabled = True, I've tried both, but to no
avail. Does anyone know if this is a bug or not or if I'm doing this wrong? Maybe setting the filesystemwachter's 'SynchronizingObject' property to
the form the component is placed on will solve the problem.
-- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Manuel Lopez |
last post by:
I have a puzzling form timer problem that I didn't experience prior to
Access 2003 (though I'm not sure access 2003 is to blame).
Here's the situation: a computer has two access 2003 databases on...
|
by: Noozer |
last post by:
I have a timer on a form. It isn't firing at all. I know that the timer is
enabled, and that the interval is low (4000, which should be 4 seconds). To
ensure the timer wasn't being inadvertantly...
|
by: Dan |
last post by:
Hi,
I have a timer on a form (System.Windows.Forms.Timer - Framework 1.1) that
is set to 60 seconds as sort an of inactivity monitor. If 60 seconds have
elapsed without any user activity I want...
|
by: Brett |
last post by:
I have a timer enabled on a form with an interval of 200. I place a break
point on the first line in the timer tick event, which is a try. After a
few events go on, the timer seems to stop. My...
|
by: RobKinney1 |
last post by:
Hello,
Wow...I have one for you all and hopefully I am not understanding this timer
object correctly. I have a timer setup that pulses a connection through a
socket every 60 seconds. But it...
|
by: james |
last post by:
Hi all.
I have a service I am writing. The last step of the onLoad event is to
enable a timer, however this timer never seems to fire. I have added a line
of code after the timer enable line to...
|
by: archana |
last post by:
Hi all,
I want to know about interval of timer.
I am using timer in windows service.I head somewhere that when i set
interval property of timer while setting interval, restart time of Pc
is...
|
by: adi |
last post by:
Hi
I need the following: at particular times of day, I want to make some
processing.
System.Windoes.Timer doesn't help much, because it exposes the Interval
property.
Instead, I need to tell...
|
by: =?Utf-8?B?RGF2ZSBCb29rZXI=?= |
last post by:
I have a Timer that I set to go off once a day, but it frequently fails! In
order to debug I would like to be able to check, at any moment, whether the
Timer is enabled and when it will next...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |