Click here to Skip to main content
15,900,258 members
Home / Discussions / C#
   

C#

 
QuestionInteraction b/w two windows services Pin
ratheeshk13-Dec-06 2:24
ratheeshk13-Dec-06 2:24 
QuestionResizing Image Pin
stanly jose13-Dec-06 1:18
stanly jose13-Dec-06 1:18 
AnswerRe: Resizing Image Pin
stancrm13-Dec-06 1:24
stancrm13-Dec-06 1:24 
AnswerRe: Resizing Image Pin
Ilíon15-Dec-06 9:28
Ilíon15-Dec-06 9:28 
Questionsystem tray Pin
justintimberlake13-Dec-06 1:08
justintimberlake13-Dec-06 1:08 
AnswerRe: system tray Pin
Not Active13-Dec-06 2:23
mentorNot Active13-Dec-06 2:23 
GeneralRe: system tray Pin
ednrgc13-Dec-06 3:34
ednrgc13-Dec-06 3:34 
Questionsystem tray for windows services!! Pin
justintimberlake13-Dec-06 0:53
justintimberlake13-Dec-06 0:53 
i have a windows service which need to be control by a windows apllication i.e the system tray. in the installer class of windows service i had a code that starts the system tray process and it works fine until when i restart my computer after restarting my computer the windows service as it should be starts automatcilly but not the system tray
apllication.
then for this i added a thread onstart method of windos service . but it seems the system tray application only starts on the background. it does not go where it should go. does any one have any idea.
here is my code plz do not complain abt the path.myproc is instace of class process!!!plz do help . nye the way it works well on windows application.

protected override void OnStart(string[] args)
{
this._applicationLaunchThread= new Thread(new ThreadStart(myproc.StartProcess));
this._applicationLaunchThread.Start();
}

public class Process
{
public Process()
{
//
// TODO: Add constructor logic here
//
}

bool _isnotexist;
public void StartProcess()
{

if(CheckProcess())
{
MyTimerSrv my= new MyTimerSrv();
try
{
System.Diagnostics.Process.Start(@"C:\Program Files\servicetracerclient\WindowsApplication1");
// my.AddToError(" application launch reached");



Thread.CurrentThread.Abort();

}
catch(Exception Ex)
{
MyTimerSrv myt= new MyTimerSrv();
myt.AddToError("application launching error");
myt.AddToError(Ex.Message.ToString());
}
}
}
public bool CheckProcess()
{
MyTimerSrv my= new MyTimerSrv();
try
{

System.Diagnostics.Process[] processes;
processes = System.Diagnostics.Process.GetProcesses();
foreach (System.Diagnostics.Process instance in processes)
{

if(instance.ProcessName.ToString()=="WindowsApplication1")
{
_isnotexist=false;

break;
}
else
{
_isnotexist=true;


}
}
}
catch(Exception ex)
{
my.AddToError("exception of process");
my.AddToError(ex.Message.ToString());
}
return(_isnotexist);
}//end of method

}
AnswerRe: system tray for windows services!! Pin
stancrm13-Dec-06 1:40
stancrm13-Dec-06 1:40 
Questionhow to save visual component Pin
puttaraj13-Dec-06 0:48
puttaraj13-Dec-06 0:48 
AnswerRe: how to save visual component Pin
stancrm13-Dec-06 1:31
stancrm13-Dec-06 1:31 
GeneralRe: how to save visual component Pin
puttaraj13-Dec-06 20:13
puttaraj13-Dec-06 20:13 
QuestionSql Question : Can i use DataRows Instead of Sql Transactions ? [modified] Pin
hdv21213-Dec-06 0:30
hdv21213-Dec-06 0:30 
AnswerRe: Sql Question : Can i use DataRows Instead of Sql Transactions ? Pin
J4amieC13-Dec-06 1:02
J4amieC13-Dec-06 1:02 
GeneralRe: Sql Question : Can i use DataRows Instead of Sql Transactions ? Pin
hdv21213-Dec-06 1:08
hdv21213-Dec-06 1:08 
GeneralRe: Sql Question : Can i use DataRows Instead of Sql Transactions ? Pin
J4amieC13-Dec-06 1:26
J4amieC13-Dec-06 1:26 
AnswerRe: Sql Question : Can i use DataRows Instead of Sql Transactions ? Pin
lost in transition 13-Dec-06 4:08
lost in transition 13-Dec-06 4:08 
Questioni have a probleam in C# window Service Pin
Sanjib Raj13-Dec-06 0:21
Sanjib Raj13-Dec-06 0:21 
AnswerRe: i have a probleam in C# window Service Pin
Colin Angus Mackay13-Dec-06 0:48
Colin Angus Mackay13-Dec-06 0:48 
Questionswitch content of a panel Pin
Marc Soleda12-Dec-06 23:41
Marc Soleda12-Dec-06 23:41 
AnswerRe: switch content of a panel Pin
quiteSmart13-Dec-06 1:43
quiteSmart13-Dec-06 1:43 
GeneralRe: switch content of a panel Pin
Marc Soleda13-Dec-06 1:57
Marc Soleda13-Dec-06 1:57 
AnswerRe: switch content of a panel Pin
Not Active13-Dec-06 2:19
mentorNot Active13-Dec-06 2:19 
QuestionSave textbox in sqlserver2000 Pin
hadio12-Dec-06 21:55
hadio12-Dec-06 21:55 
AnswerRe: Save textbox in sqlserver2000 Pin
Pete O'Hanlon12-Dec-06 22:36
mvePete O'Hanlon12-Dec-06 22:36 

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.