|
-
Jun 16th, 2005, 11:50 AM
#1
Thread Starter
Hyperactive Member
FileSystemWatcher Changed Event [resolved]
Hey guys, this is probably a simple question, but I am new to VB .net....
I have a FileSystemWatcher object in a Module and it is declared in that Module as public. The variable name is FileWatch. I also have a FileWatch.Changed() event in the same module, but it gives me an error whenever I try to compile:
error BC30506: Handles clause requires a WithEvents variable.
That error points to:
VB Code:
Public Sub FileWatch_Changed(ByVal sender As System.Object, ByVal e As System.IO.FileSystemEventArgs) Handles FileWatch.Changed
I know it's because it is in a module, and not in a form's code, but what do I add with WithEvents?
Thanks,
jonwondering
Last edited by jonwondering; Jun 16th, 2005 at 03:00 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|