Click here to Skip to main content
15,884,821 members
Home / Discussions / C#
   

C#

 
AnswerRe: I'm needing to have a textbox to be on top of all other controls on the form. Pin
OriginalGriff29-Jun-09 8:22
mveOriginalGriff29-Jun-09 8:22 
QuestionCalling GetPrinterData (windows api) from c# Pin
belzer29-Jun-09 6:52
belzer29-Jun-09 6:52 
AnswerRe: Calling GetPrinterData (windows api) from c# Pin
Svetlin Panayotov29-Jun-09 8:56
Svetlin Panayotov29-Jun-09 8:56 
GeneralRe: Calling GetPrinterData (windows api) from c# Pin
belzer29-Jun-09 10:51
belzer29-Jun-09 10:51 
GeneralRe: Calling GetPrinterData (windows api) from c# Pin
Manfred Wilner25-Jul-16 7:18
Manfred Wilner25-Jul-16 7:18 
AnswerRe: Calling GetPrinterData (windows api) from c# Pin
Henry Minute29-Jun-09 14:11
Henry Minute29-Jun-09 14:11 
GeneralRe: Calling GetPrinterData (windows api) from c# Pin
belzer30-Jun-09 2:56
belzer30-Jun-09 2:56 
QuestionWindows Service Application: Will not execute separate class Pin
bellorke29-Jun-09 6:37
bellorke29-Jun-09 6:37 
Hi,

I would like to turn one of the projects on this site into a service application - (the project "Capturing Minimized Window's: A Kid's Trick). I have followed a tutorial on how to build a service application and have inserted the classes into my application. However, it does not seem to execute these classes.

I do know that the application works because I have used the same code in an application I have built, so I do not understand why it will not work when I put it into a service application. Maybe I need to do something special with the classes?

private void OnElapsedTime(object source, ElapsedEventArgs e)
        {
            AddToFile(DateTime.Now + " Another entry");//Adds "Another Entry" to a text file so I can tell the timer loop is running

            this.listBoxSnap.Items.Clear(); // Clears the list box 
            this.pictureBoxSnap.Image = null;
            this.pictureBoxSnap2.Image = null;
            
            //name space MinimizeCapture, class is WindowSnap
            //In my normal application this line works great, adds the names of all the windows on my screen to a listbox
            this.listBoxSnap.Items.AddRange(MinimizeCapture.WindowSnap.GetAllWindows(false, false).ToArray());
           
            //The number of windows this application captures should be output to the text file, I keep getting "0" meaning the listbox has  
            //no items and the class isn't working
            AddToFile(listBoxSnap.Items.Count.ToString());
       }


My text files shows how the service starts/stops, shows the "Add to File" line and also shows a count of "0" for the listbox count.

I have researched Service Applications and have come across "Installer Classes" but I do not understand how to use them after having read up on them, nor do I understand if that is the problem? Do I need to call the class a certain way, can I not just simply "Insert a class" into this application like I would any other project?

Any help would be greatly appreciated.

Thank you.
AnswerRe: Windows Service Application: Will not execute separate class Pin
Gajula Srikanth29-Jun-09 10:27
Gajula Srikanth29-Jun-09 10:27 
QuestionSerial Port DataReceived method in a Windows Service Pin
saeidfarahi29-Jun-09 6:20
saeidfarahi29-Jun-09 6:20 
AnswerRe: Serial Port DataReceived method in a Windows Service Pin
Luc Pattyn29-Jun-09 7:07
sitebuilderLuc Pattyn29-Jun-09 7:07 
Questionchange "registry value's" type by c# ? [modified] Pin
jamesband00729-Jun-09 5:27
jamesband00729-Jun-09 5:27 
AnswerRe: change "registry value's" type by c# ? Pin
michaelvdnest29-Jun-09 6:22
michaelvdnest29-Jun-09 6:22 
AnswerRe: change "registry value's" type by c# ? Pin
Eddy Vluggen29-Jun-09 6:29
professionalEddy Vluggen29-Jun-09 6:29 
GeneralRe: change "registry value's" type by c# ? Pin
Luc Pattyn29-Jun-09 7:10
sitebuilderLuc Pattyn29-Jun-09 7:10 
GeneralRe: change "registry value's" type by c# ? Pin
Eddy Vluggen29-Jun-09 7:35
professionalEddy Vluggen29-Jun-09 7:35 
QuestionCreate and open a taskpane in outlook opened worddocument Pin
fhoernchen29-Jun-09 4:57
fhoernchen29-Jun-09 4:57 
QuestionIIS Server with C# application Pin
treuveni29-Jun-09 4:55
treuveni29-Jun-09 4:55 
AnswerRe: IIS Server with C# application Pin
DoctorMick29-Jun-09 5:28
DoctorMick29-Jun-09 5:28 
GeneralRe: IIS Server with C# application Pin
treuveni29-Jun-09 5:38
treuveni29-Jun-09 5:38 
GeneralRe: IIS Server with C# application Pin
EliottA29-Jun-09 5:45
EliottA29-Jun-09 5:45 
GeneralRe: IIS Server with C# application Pin
treuveni29-Jun-09 5:51
treuveni29-Jun-09 5:51 
GeneralRe: IIS Server with C# application Pin
EliottA29-Jun-09 6:07
EliottA29-Jun-09 6:07 
GeneralRe: IIS Server with C# application Pin
Not Active29-Jun-09 8:30
mentorNot Active29-Jun-09 8:30 
Questionabout full-text-search Pin
leone29-Jun-09 4:43
leone29-Jun-09 4: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.