Too much in Load-Event?

G

Guest

Hello all!
This may seem stupid, but here it goes.
In my load event I have a bunch of Add Handler statements for a file watch
process.
Here is a sample. I have 8 of these little gems goin on. Basicly this is
looking for a *.rb file to create a another window in the program. I can go
into more detail if you want. The problem is, the first four events work, but
the the bottom four don't do anything. I can arrange them around, so they
all work, except if they were placed as the last four. Now this did work at
one time, but now its not.

AddHandler RollMsg.Created, AddressOf RollMsg_Created
RollMsg.Path = (TempFileSetting)
RollMsg.Filter = "*.rb"
RollMsg.IncludeSubdirectories = False
RollMsg.EnableRaisingEvents = True


AddHandler ToWatch.Created, AddressOf ToWatch_Created
ToWatch.Path = (TempFileSetting)
ToWatch.Filter = "*.to"
ToWatch.EnableRaisingEvents = True
ToWatch.IncludeSubdirectories = False

AddHandler FggWatch.Created, AddressOf FggWatch_Created
FggWatch.Path = (TempFileSetting)
FggWatch.Filter = "*.fgg"
FggWatch.IncludeSubdirectories = False
FggWatch.EnableRaisingEvents = True


AddHandler FgnWatch.Created, AddressOf FgnWatch_Created
FgnWatch.Path = (TempFileSetting)
FgnWatch.Filter = "*.fgn"
FgnWatch.IncludeSubdirectories = False
FgnWatch.EnableRaisingEvents = True

AddHandler IncWatch.Created, AddressOf IncWatch_Created
IncWatch.Path = (TempFileSetting)
IncWatch.Filter = "*.inw"
IncWatch.IncludeSubdirectories = False
IncWatch.EnableRaisingEvents = True

Any thoughts how to fix this?

Thanks!

Rudy
 
N

NullQwerty

Hello all!
This may seem stupid, but here it goes.
In my load event I have a bunch of Add Handler statements for a file watch
process.
Here is a sample. I have 8 of these little gems goin on. Basicly this is
looking for a *.rb file to create a another window in the program. I can go
into more detail if you want. The problem is, the first four events work, but
the the bottom four don't do anything. I can arrange them around, so they
all work, except if they were placed as the last four. Now this did work at
one time, but now its not.

AddHandler RollMsg.Created, AddressOf RollMsg_Created
RollMsg.Path = (TempFileSetting)
RollMsg.Filter = "*.rb"
RollMsg.IncludeSubdirectories = False
RollMsg.EnableRaisingEvents = True

AddHandler ToWatch.Created, AddressOf ToWatch_Created
ToWatch.Path = (TempFileSetting)
ToWatch.Filter = "*.to"
ToWatch.EnableRaisingEvents = True
ToWatch.IncludeSubdirectories = False

AddHandler FggWatch.Created, AddressOf FggWatch_Created
FggWatch.Path = (TempFileSetting)
FggWatch.Filter = "*.fgg"
FggWatch.IncludeSubdirectories = False
FggWatch.EnableRaisingEvents = True

AddHandler FgnWatch.Created, AddressOf FgnWatch_Created
FgnWatch.Path = (TempFileSetting)
FgnWatch.Filter = "*.fgn"
FgnWatch.IncludeSubdirectories = False
FgnWatch.EnableRaisingEvents = True

AddHandler IncWatch.Created, AddressOf IncWatch_Created
IncWatch.Path = (TempFileSetting)
IncWatch.Filter = "*.inw"
IncWatch.IncludeSubdirectories = False
IncWatch.EnableRaisingEvents = True

Any thoughts how to fix this?

Thanks!

Rudy


Have you tried moving the code to InitializeComponent, rather than the
Load event?
 
G

Guest

Hey Null!

So I tried what you suggested. Same thing. NowI can get some of them to
work, but not all at the same time. What I have is 13 FileWatch process goin
on. Could there be too many?

Thanks!

Rudy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top