Results 1 to 9 of 9

Thread: FileSystemWatcher Changed Event [resolved]

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member jonwondering's Avatar
    Join Date
    May 2005
    Posts
    311

    Resolved 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:
    1. 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
  •  



Click Here to Expand Forum to Full Width