Click here to Skip to main content
15,897,704 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionRe: VB.Net 2008 Pin
Eddy Vluggen16-May-14 3:02
professionalEddy Vluggen16-May-14 3:02 
QuestionList(Of ObjectWithProperties) distinct property values Pin
Johan Hakkesteegt15-May-14 3:32
Johan Hakkesteegt15-May-14 3:32 
AnswerRe: List(Of ObjectWithProperties) distinct property values Pin
Richard MacCutchan15-May-14 3:49
mveRichard MacCutchan15-May-14 3:49 
AnswerRe: List(Of ObjectWithProperties) distinct property values Pin
David Mujica15-May-14 6:32
David Mujica15-May-14 6:32 
AnswerRe: List(Of ObjectWithProperties) distinct property values Pin
Eddy Vluggen15-May-14 7:53
professionalEddy Vluggen15-May-14 7:53 
GeneralRe: List(Of ObjectWithProperties) distinct property values Pin
Johan Hakkesteegt15-May-14 20:16
Johan Hakkesteegt15-May-14 20:16 
GeneralRe: List(Of ObjectWithProperties) distinct property values Pin
Mycroft Holmes15-May-14 22:41
professionalMycroft Holmes15-May-14 22:41 
QuestionWindow Service Does Not Stay "Alive" While Running Pin
ToolTimeTabor14-May-14 15:13
ToolTimeTabor14-May-14 15:13 
How do I keep a class object "alive" in a Windows Service?

I have a simple class object (clsWatcher) that monitors a folder using an instantiation of the FileSystemWatcher class. It works great. When a change is made to the folder being "watched" it triggers a log entry.

When I use the clsWatcher as a form-level object in a standard Windows Forms EXE, it works perfectly as long as the windows form is open. When the form closes, it dies and no watching is done. Perfect.

When I transfer this class to a SYSTRAY application, it continues to work correctly. As long as the SYSTRAY application is not exited, the clsWatcher works properly. When I exit the SYSTRAY application, it dies and no watching is done. Perfect.

When I transfer this class to a Windows Service, it does not work as desired. The service starts, the clsWatcher instantiates, and then the service "finalizes" and the clsWatcher dies even though the service is still "started" and no errors were logged (I have an Application Log feature to send messages that can be observed during start up and errors.)

How do I keep the service/application "running" in order to keep the instantiated clsWatcher object alive?
AnswerRe: Window Service Does Not Stay "Alive" While Running Pin
Bernhard Hiller14-May-14 21:51
Bernhard Hiller14-May-14 21:51 
AnswerRe: Window Service Does Not Stay "Alive" While Running Pin
Eddy Vluggen15-May-14 3:00
professionalEddy Vluggen15-May-14 3:00 
AnswerRe: Window Service Does Not Stay "Alive" While Running Pin
David Mujica15-May-14 6:25
David Mujica15-May-14 6:25 
QuestionIf/and Statements Pin
David Rubin13-May-14 12:34
David Rubin13-May-14 12:34 
AnswerRe: If/and Statements Pin
Peter Leow13-May-14 14:33
professionalPeter Leow13-May-14 14:33 
AnswerRe: If/and Statements Pin
charliedev14-May-14 19:20
charliedev14-May-14 19:20 
Questionsave images as .gif Pin
khei-chan00712-May-14 17:44
khei-chan00712-May-14 17:44 
AnswerRe: save images as .gif Pin
Chris Quinn12-May-14 20:56
Chris Quinn12-May-14 20:56 
GeneralRe: save images as .gif Pin
khei-chan00712-May-14 21:25
khei-chan00712-May-14 21:25 
GeneralSaving Image as Gif Pin
I. Bandaranayake13-May-14 1:49
I. Bandaranayake13-May-14 1:49 
AnswerRe: save images as .gif Pin
Richard MacCutchan12-May-14 22:47
mveRichard MacCutchan12-May-14 22:47 
QuestionMapWinGis project in Visual Basic.NET Pin
Member 1081056711-May-14 7:32
Member 1081056711-May-14 7:32 
QuestionVB CODE TO RECEIVE SMS THROUGH GSM MODEM Pin
elly ianto10-May-14 2:34
elly ianto10-May-14 2:34 
AnswerRe: VB CODE TO RECEIVE SMS THROUGH GSM MODEM PinPopular
Dave Kreskowiak10-May-14 3:38
mveDave Kreskowiak10-May-14 3:38 
GeneralRe: VB CODE TO RECEIVE SMS THROUGH GSM MODEM Pin
elly ianto12-May-14 3:24
elly ianto12-May-14 3:24 
Questionentity framework too slow executing even a small query Pin
dilkonika9-May-14 14:11
dilkonika9-May-14 14:11 
AnswerRe: entity framework too slow executing even a small query Pin
Dave Kreskowiak10-May-14 3:43
mveDave Kreskowiak10-May-14 3:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.