Click here to Skip to main content
15,886,026 members
Home / Discussions / C#
   

C#

 
GeneralRe: Compute Speed of Download Algorithm Pin
zx2c46-May-06 13:30
zx2c46-May-06 13:30 
GeneralRe: Compute Speed of Download Algorithm Pin
Phil C6-May-06 15:32
Phil C6-May-06 15:32 
QuestionFull Text PDF Pin
smarttom993-May-06 11:47
smarttom993-May-06 11:47 
QuestionAdvice on best technologies for video / graphics work Pin
srev3-May-06 11:17
srev3-May-06 11:17 
QuestionHave associated files use currently running instance Pin
ilion blaze3-May-06 10:41
ilion blaze3-May-06 10:41 
AnswerRe: Have associated files use currently running instance Pin
Stefan Troschuetz3-May-06 11:14
Stefan Troschuetz3-May-06 11:14 
GeneralRe: Have associated files use currently running instance Pin
ilion blaze3-May-06 11:19
ilion blaze3-May-06 11:19 
GeneralRe: Have associated files use currently running instance Pin
Phillip M. Hoff3-May-06 19:31
Phillip M. Hoff3-May-06 19:31 
You may be able to do something like this:

<br />
void Main(string[] arguments)<br />
{<br />
  if (IsFirstInstance())<br />
  {<br />
    StartAndSubscribeToStartEvents(arguments);<br />
  }<br />
  else<br />
  {<br />
    PublishStartEvent(arguments);<br />
  }<br />
}<br />


The IsFirstInstance() method would use one of the mechanisms floating around for determining whether an instance of the application is the only instance running. The StartAndSubscribeToOpenEvents() would, obviously, start the application as normal. It would also create a subscription to some kind of event that will be published whenever a subsequent instance of the application is started. The event could take the form of a MSMQ message, a method call using .NET remoting, windows messages, shared memory, raw sockets--whatever your favorite IPC mechanism may be. The PublishStartEvents() method would be invoked whenver a subsequent instance of the application is started. It publishes the start event, passing any arguments the instance may be given (e.g. the path to the log file). The primary instance then gets notified of the event and can do whatever it likes with the event data (e.g. open the log itself).

Just an idea.

-Phil
QuestionHow can I set a value in a cell of the DataGridView that contains a DataGridViewComboBoxColumn? Pin
Elvia Gonzalez3-May-06 9:51
Elvia Gonzalez3-May-06 9:51 
AnswerRe: How can I set a value in a cell of the DataGridView that contains a DataGridViewComboBoxColumn? Pin
Elvia Gonzalez3-May-06 13:09
Elvia Gonzalez3-May-06 13:09 
GeneralRe: How can I set a value in a cell of the DataGridView that contains a DataGridViewComboBoxColumn? Pin
goyal manish3-May-06 21:36
goyal manish3-May-06 21:36 
GeneralRe: How can I set a value in a cell of the DataGridView that contains a DataGridViewComboBoxColumn? Pin
Elvia Gonzalez4-May-06 7:29
Elvia Gonzalez4-May-06 7:29 
GeneralRe: How can I set a value in a cell of the DataGridView that contains a DataGridViewComboBoxColumn? Pin
Elvia Gonzalez4-May-06 8:13
Elvia Gonzalez4-May-06 8:13 
GeneralRe: How can I set a value in a cell of the DataGridView that contains a DataGridViewComboBoxColumn? Pin
Elvia Gonzalez4-May-06 14:31
Elvia Gonzalez4-May-06 14:31 
QuestionHow to pass form reference at run time. Pin
abhinish3-May-06 9:32
abhinish3-May-06 9:32 
AnswerRe: changing datagridview cell Pin
Office Lineman3-May-06 12:27
Office Lineman3-May-06 12:27 
QuestionCustom Tooltips Pin
siongc3-May-06 9:15
siongc3-May-06 9:15 
AnswerRe: Custom Tooltips Pin
Ravi Bhavnani3-May-06 9:45
professionalRavi Bhavnani3-May-06 9:45 
Questionautomation of excel chart generation Pin
Gollaprolu3-May-06 8:57
Gollaprolu3-May-06 8:57 
QuestionNeed help sending SOAP message with byte array in message Pin
jdrage3-May-06 8:44
jdrage3-May-06 8:44 
Questionconverting numbers to date Pin
TheJudeDude3-May-06 8:43
TheJudeDude3-May-06 8:43 
AnswerRe: converting numbers to date Pin
Ravi Bhavnani3-May-06 9:01
professionalRavi Bhavnani3-May-06 9:01 
GeneralRe: converting numbers to date Pin
TheJudeDude3-May-06 9:16
TheJudeDude3-May-06 9:16 
GeneralRe: converting numbers to date Pin
Ravi Bhavnani3-May-06 9:20
professionalRavi Bhavnani3-May-06 9:20 
GeneralRe: converting numbers to date Pin
TheJudeDude3-May-06 9:25
TheJudeDude3-May-06 9:25 

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.