Click here to Skip to main content
15,028,618 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: How to make a program that is able to save data ? Pin
Me0w!8-May-07 10:21
MemberMe0w!8-May-07 10:21 
QuestionDeleting multiple rows Pin
TAK788-May-07 8:00
MemberTAK788-May-07 8:00 
AnswerRe: Deleting multiple rows Pin
Dave Kreskowiak8-May-07 8:13
mveDave Kreskowiak8-May-07 8:13 
GeneralRe: Deleting multiple rows Pin
TAK788-May-07 8:39
MemberTAK788-May-07 8:39 
GeneralRe: Deleting multiple rows Pin
TAK788-May-07 8:53
MemberTAK788-May-07 8:53 
Questionsearch hard drive for files Pin
jds12078-May-07 7:36
Memberjds12078-May-07 7:36 
AnswerRe: search hard drive for files Pin
MatrixCoder8-May-07 7:59
MemberMatrixCoder8-May-07 7:59 
AnswerRe: search hard drive for files Pin
Dave Kreskowiak8-May-07 8:10
mveDave Kreskowiak8-May-07 8:10 
First, scrap this service. If you can't write the code to search for files in a normal app, writing it as serice will only serve to frustrate you to death. Besides, the way you've written this code demonstrates a lack of understanding how Services work, how to write them, and most importantly, how to communicate with them to get them to do something useful.

The Timer isn't doing anything other than creating an event log on every tick of the timer.

You have no method of calling your function. Sure, it CAN work as a search, but you have no methods in here that allow for communication with the service in any way, so you have no way to call the search code.

Services require you to do a lot more planning up front. There's no such thing a "whipping one togther" like you can with a Console or Windows Forms app.

There's nothing in this code to salvage to get a working service. This thing really does need to be scrapped.

Simplify your code and get a working search in a Console or Windows Forms app first. The experience you get with that will show you what a search needs for input and what it can return as output and how it needs to be returned. After that, you can add threading support, which will give you the basis for writing a service that's going to work. You can't do this with a Timer...


A guide to posting questions on CodeProject[^]

Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007


GeneralRe: search hard drive for files Pin
jds12078-May-07 10:21
Memberjds12078-May-07 10:21 
GeneralRe: search hard drive for files Pin
Dave Kreskowiak8-May-07 10:32
mveDave Kreskowiak8-May-07 10:32 
GeneralRe: search hard drive for files Pin
Dave Kreskowiak8-May-07 17:24
mveDave Kreskowiak8-May-07 17:24 
GeneralRe: search hard drive for files Pin
P P Vilsad8-May-07 21:21
MemberP P Vilsad8-May-07 21:21 
AnswerRe: search hard drive for files Pin
P P Vilsad8-May-07 21:18
MemberP P Vilsad8-May-07 21:18 
QuestionStart up Pin
scorp_scorp8-May-07 7:23
Memberscorp_scorp8-May-07 7:23 
AnswerRe: Start up Pin
MatrixCoder8-May-07 7:55
MemberMatrixCoder8-May-07 7:55 
AnswerRe: Start up Pin
nlarson118-May-07 7:58
Membernlarson118-May-07 7:58 
QuestionDataGridView - Display Row Numbers on Control Pin
RichardBerry8-May-07 4:26
MemberRichardBerry8-May-07 4:26 
AnswerRe: DataGridView - Display Row Numbers on Control Pin
Rupesh Kumar Swami8-May-07 5:27
MemberRupesh Kumar Swami8-May-07 5:27 
GeneralRe: DataGridView - Display Row Numbers on Control Pin
RichardBerry8-May-07 7:43
MemberRichardBerry8-May-07 7:43 
QuestionOffice 2007 ActiveX Pin
Stijn Courtheyn8-May-07 4:26
MemberStijn Courtheyn8-May-07 4:26 
QuestionNeed help with Word template Pin
Jats_4ru8-May-07 2:33
MemberJats_4ru8-May-07 2:33 
QuestionExtracting data from Web pages Pin
Farazj8-May-07 1:29
MemberFarazj8-May-07 1:29 
Questionhow to access dynamically created control Pin
WorkingAcc8-May-07 1:07
MemberWorkingAcc8-May-07 1:07 
GeneralRe: how to access dynamically created control [modified] Pin
Colin Angus Mackay8-May-07 2:26
MemberColin Angus Mackay8-May-07 2:26 
QuestionApplication Shortcut Pin
harsh_c7-May-07 21:56
professionalharsh_c7-May-07 21:56 

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.