Click here to Skip to main content
16,005,038 members
Home / Discussions / C#
   

C#

 
QuestionReporting system information, operating system, ram, installed applications such as Oracle and versions?? Pin
RichardContact-128-Jun-08 6:20
RichardContact-128-Jun-08 6:20 
QuestionCompressing multiple files and crypto question Pin
PetePetePete28-Jun-08 5:24
PetePetePete28-Jun-08 5:24 
QuestionHow can we select XML's root node with LINQ ? Pin
Mohammad Dayyan28-Jun-08 3:20
Mohammad Dayyan28-Jun-08 3:20 
AnswerRe: How can we select XML's root node with LINQ ? Pin
Colin Angus Mackay28-Jun-08 3:37
Colin Angus Mackay28-Jun-08 3:37 
GeneralRe: How can we select XML's root node with LINQ ? Pin
Mohammad Dayyan28-Jun-08 3:48
Mohammad Dayyan28-Jun-08 3:48 
Questioncrystal report problem Pin
Bhim Prakash Singh28-Jun-08 3:03
Bhim Prakash Singh28-Jun-08 3:03 
AnswerRe: crystal report problem Pin
Colin Angus Mackay28-Jun-08 3:22
Colin Angus Mackay28-Jun-08 3:22 
QuestionService and windows GUI interaction problem. Pin
007_Stu28-Jun-08 3:01
007_Stu28-Jun-08 3:01 
Hi all,

I am really stumped on this one so really appreciate any help.

I have a .net service which during OnStart creates a Process() to another .NET exe which I want to display a notify icon in the system tray and show a form. However the Main(string[] args) event in the exe is not firing even though the process is started (exe exists as process in Task Manager) All this code works from another Test exe but not the service. (Full Code Below). I have updated the registrykey for the service to allow this but have had no imrovement.

Cheers

Stu



*****Service*****

protected override void OnStart(string[] args)

{

System.IO.StreamWriter sw = new System.IO.StreamWriter(@"C:\CodeDir\KnowledgeAssist\KAClientManager\bin\Debug\Test1.txt", true);

sw.WriteLine("0");

try

{

Process notify = new Process();

notify.StartInfo.FileName = @"C:\CodeDir\KnowledgeAssist\KANotify\bin\Debug\KANotify.exe";


notify.Start();

sw.WriteLine("1");

}

catch(Exception ex)

{

sw.WriteLine(ex.Message);

}

sw.Close();

}



*****EXE*****

public static void Main(string[] args)

{

//new TrayIcon();

System.IO.StreamWriter sw = new System.IO.StreamWriter(@"C:\CodeDir\KnowledgeAssist\KAClientManager\bin\Debug\Test1.txt", true);

sw.WriteLine("Main");

sw.Close();

Application.EnableVisualStyles();

Application.SetCompatibleTextRenderingDefault(false);

Application.Run(new Form1());

}
AnswerRe: Service and windows GUI interaction problem. Pin
Giorgi Dalakishvili28-Jun-08 10:51
mentorGiorgi Dalakishvili28-Jun-08 10:51 
QuestionSending email w/ authentication C# Pin
buzobbu28-Jun-08 2:23
buzobbu28-Jun-08 2:23 
QuestionMonitoring Clipboard using Windows Service Pin
Anindya Chatterjee28-Jun-08 1:48
Anindya Chatterjee28-Jun-08 1:48 
QuestionIndexing Generic Arrays Pin
DwR28-Jun-08 1:42
DwR28-Jun-08 1:42 
AnswerRe: Indexing Generic Arrays Pin
Guffa28-Jun-08 3:14
Guffa28-Jun-08 3:14 
QuestionWhat does this syntax mean? Pin
martin_hughes28-Jun-08 0:53
martin_hughes28-Jun-08 0:53 
AnswerRe: What does this syntax mean? Pin
User 665828-Jun-08 0:56
User 665828-Jun-08 0:56 
QuestionHow to Enable & Disable USB Drive Pin
Joe Rozario27-Jun-08 22:31
Joe Rozario27-Jun-08 22:31 
AnswerRe: How to Enable & Disable USB Drive Pin
leppie28-Jun-08 1:17
leppie28-Jun-08 1:17 
GeneralRe: How to Enable & Disable USB Drive Pin
Anthony Mushrow28-Jun-08 2:39
professionalAnthony Mushrow28-Jun-08 2:39 
AnswerRe: How to Enable & Disable USB Drive Pin
Paw Jershauge28-Jun-08 3:52
Paw Jershauge28-Jun-08 3:52 
AnswerRe: How to Enable & Disable USB Drive Pin
7sajjad8khna614-Sep-10 23:38
7sajjad8khna614-Sep-10 23:38 
QuestionSingle dataset to multiple Pin
ali zaidi27-Jun-08 22:29
ali zaidi27-Jun-08 22:29 
AnswerRe: Single dataset to multiple Pin
Abhijit Jana27-Jun-08 23:20
professionalAbhijit Jana27-Jun-08 23:20 
AnswerRe: Single dataset to multiple Pin
Christian Graus27-Jun-08 23:43
protectorChristian Graus27-Jun-08 23:43 
QuestionPrinting Data From a Windows Application Pin
jonhbt27-Jun-08 21:16
jonhbt27-Jun-08 21:16 
AnswerRe: Printing Data From a Windows Application Pin
wasimsharp27-Jun-08 23:08
wasimsharp27-Jun-08 23:08 

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.