By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,017 Members | 1,158 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,017 IT Pros & Developers. It's quick & easy.

Need help on reccomended reading to learn some new tricks :)

P: n/a
Hi,

I'm a selv learned developer and I have a few years of experience with VB6,
ASP, PHP and such.
I've dug into coding with VB.NET and this language simply amazes me. I
really LOVE this language. I've read some Java and i have tried to learn
java but really haven't gotten the time yet so i know a bit OO. ( i tend to
fall back to languages i know i guess ;) but i see that .Net is worth
learning for me )

However i have never really understood events. I understand what an event is
and why those beautiful things exists :) but i don't see the big picture
yet.
I've created a class that implements the fileSystemWatcher and i have added
handlers to trigger on change, rename and delete of a logfile.

What i don't understand is when the events will be triggered and for how
long they will be triggered and such. This class is going to be one of many
classes that are tied up to a NTService.
If i create an instance of my class in my main program (the NT Service) will
the events trigger as long as the instance exists (i guess not) or will the
events trigger only when i'm inside the function that sets
oWatcherFileWatcher.EnableRaisingEvents = True ?

I guess i need to extend my class with my own events ? Can someone point me
to eighter a book that covers this topic well ? (i've got access to
www.books24x7.com hence i can read most books online) or a webpage ? I've
searched for the topic but most books just says events are nice blah blah
blah and show a simple example of an event but they don't show it all (i
guess it's possible to do what i want..... i hope? )

Thanks a lot

/Kai
Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Both Building Applications and Components with Visual Basic by Ted Pattison
and Visual Basic .NET for Advanced Programmers by Paul Kimmell explain this
in depth. Jeffrey Richter's book on Applied .NET Framework programming for
VB.NET does too (I have the C# version, but he wrote a VB.NET version with I
believe Balena, and it should be just as good).

As far as your file watcher, it'll keep raising events until the property is
set to false or the program stops running
"Kai Thorsrud" <ka******@thispartgoesaways.start.no> wrote in message
news:us**************@TK2MSFTNGP11.phx.gbl...
Hi,

I'm a selv learned developer and I have a few years of experience with VB6, ASP, PHP and such.
I've dug into coding with VB.NET and this language simply amazes me. I
really LOVE this language. I've read some Java and i have tried to learn
java but really haven't gotten the time yet so i know a bit OO. ( i tend to fall back to languages i know i guess ;) but i see that .Net is worth
learning for me )

However i have never really understood events. I understand what an event is and why those beautiful things exists :) but i don't see the big picture
yet.
I've created a class that implements the fileSystemWatcher and i have added handlers to trigger on change, rename and delete of a logfile.

What i don't understand is when the events will be triggered and for how
long they will be triggered and such. This class is going to be one of many classes that are tied up to a NTService.
If i create an instance of my class in my main program (the NT Service) will the events trigger as long as the instance exists (i guess not) or will the events trigger only when i'm inside the function that sets
oWatcherFileWatcher.EnableRaisingEvents = True ?

I guess i need to extend my class with my own events ? Can someone point me to eighter a book that covers this topic well ? (i've got access to
www.books24x7.com hence i can read most books online) or a webpage ? I've
searched for the topic but most books just says events are nice blah blah
blah and show a simple example of an event but they don't show it all (i
guess it's possible to do what i want..... i hope? )

Thanks a lot

/Kai

Nov 20 '05 #2

P: n/a
Than you for the help...
"William Ryan" <do********@nospam.comcast.net> wrote in message
news:uY**************@tk2msftngp13.phx.gbl...
Both Building Applications and Components with Visual Basic by Ted Pattison and Visual Basic .NET for Advanced Programmers by Paul Kimmell explain this in depth. Jeffrey Richter's book on Applied .NET Framework programming for VB.NET does too (I have the C# version, but he wrote a VB.NET version with I believe Balena, and it should be just as good).

As far as your file watcher, it'll keep raising events until the property is set to false or the program stops running
"Kai Thorsrud" <ka******@thispartgoesaways.start.no> wrote in message
news:us**************@TK2MSFTNGP11.phx.gbl...
Hi,

I'm a selv learned developer and I have a few years of experience with VB6,
ASP, PHP and such.
I've dug into coding with VB.NET and this language simply amazes me. I
really LOVE this language. I've read some Java and i have tried to learn
java but really haven't gotten the time yet so i know a bit OO. ( i tend

to
fall back to languages i know i guess ;) but i see that .Net is worth
learning for me )

However i have never really understood events. I understand what an event is
and why those beautiful things exists :) but i don't see the big picture
yet.
I've created a class that implements the fileSystemWatcher and i have

added
handlers to trigger on change, rename and delete of a logfile.

What i don't understand is when the events will be triggered and for how
long they will be triggered and such. This class is going to be one of

many
classes that are tied up to a NTService.
If i create an instance of my class in my main program (the NT Service)

will
the events trigger as long as the instance exists (i guess not) or will

the
events trigger only when i'm inside the function that sets
oWatcherFileWatcher.EnableRaisingEvents = True ?

I guess i need to extend my class with my own events ? Can someone point

me
to eighter a book that covers this topic well ? (i've got access to
www.books24x7.com hence i can read most books online) or a webpage ?

I've searched for the topic but most books just says events are nice blah blah blah and show a simple example of an event but they don't show it all (i
guess it's possible to do what i want..... i hope? )

Thanks a lot

/Kai


Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.