Click here to Skip to main content
15,887,337 members
Home / Discussions / C#
   

C#

 
Questionto read an element in DataGrid Pin
Pinnapureddy22-Aug-06 2:04
Pinnapureddy22-Aug-06 2:04 
AnswerRe: to read an element in DataGrid Pin
rah_sin22-Aug-06 2:13
professionalrah_sin22-Aug-06 2:13 
Questionhow to view in another... Pin
diddy3422-Aug-06 1:26
diddy3422-Aug-06 1:26 
AnswerRe: how to view in another... Pin
Martin#22-Aug-06 1:50
Martin#22-Aug-06 1:50 
AnswerRe: how to view in another... Pin
Christian Graus22-Aug-06 2:10
protectorChristian Graus22-Aug-06 2:10 
QuestionHow to know wheather a exe is running or not... Pin
Ravikumar Patra22-Aug-06 1:08
professionalRavikumar Patra22-Aug-06 1:08 
AnswerRe: How to know wheather a exe is running or not... Pin
Navi1522-Aug-06 1:27
Navi1522-Aug-06 1:27 
AnswerRe: How to know wheather a exe is running or not... Pin
gnjunge22-Aug-06 1:29
gnjunge22-Aug-06 1:29 
You can use a Mutex. Here is a piece of code that shows how to do it:


In program.cs:
<pre>
private static System.Threading.Mutex _mutex;
private const string _mutexName = "Company_Product_MUTEX";

/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{

//Allow only one instance for this app to be active
try
{
//try to open existing mutex
_mutex = System.Threading.Mutex.OpenExisting(_mutexName);

if (_mutex != null)
return; //exit program;
}
catch
{ //There was no existing mutex so create mutex
try
{
_mutex = new System.Threading.Mutex(true, _mutexName);
}
catch { };
}

Application.ApplicationExit += new EventHandler(Application_ApplicationExit);

/// do rest of the code, like Application.Run() etc.

}

static void Application_ApplicationExit(object sender, EventArgs e)
{
//Release Mutex
if (_mutex != null)
{
_mutex.ReleaseMutex();
}
}

</pre>


That should do the trick.


AnswerRe: How to know wheather a exe is running or not... Pin
User 665822-Aug-06 1:29
User 665822-Aug-06 1:29 
AnswerRe: How to know wheather a exe is running or not... Pin
Eric Dahlvang22-Aug-06 6:14
Eric Dahlvang22-Aug-06 6:14 
Questioni use .Net framework 1.1 version, how can i access serial port in C#.Net through Win API's Pin
premkamalg22-Aug-06 0:58
premkamalg22-Aug-06 0:58 
AnswerRe: i use .Net framework 1.1 version, how can i access serial port in C#.Net through Win API's Pin
gnjunge22-Aug-06 1:33
gnjunge22-Aug-06 1:33 
AnswerRe: i use .Net framework 1.1 version, how can i access serial port in C#.Net through Win API's Pin
Christian Graus22-Aug-06 2:02
protectorChristian Graus22-Aug-06 2:02 
GeneralRe: i use .Net framework 1.1 version, how can i access serial port in C#.Net through Win API's Pin
Dan Neely22-Aug-06 2:06
Dan Neely22-Aug-06 2:06 
Questionhow to implement a chess board in C# Pin
sasheena22-Aug-06 0:57
sasheena22-Aug-06 0:57 
AnswerRe: how to implement a chess board in C# Pin
Christian Graus22-Aug-06 2:04
protectorChristian Graus22-Aug-06 2:04 
QuestionWindows System Administration Programming Pin
Mostafa Siraj22-Aug-06 0:54
Mostafa Siraj22-Aug-06 0:54 
AnswerRe: Windows System Administration Programming Pin
Eric Dahlvang22-Aug-06 6:16
Eric Dahlvang22-Aug-06 6:16 
AnswerI need to do this under .Net Pin
Mostafa Siraj22-Aug-06 7:20
Mostafa Siraj22-Aug-06 7:20 
QuestionExcel Export Pin
raheeli22-Aug-06 0:53
raheeli22-Aug-06 0:53 
AnswerRe: Excel Export Pin
Eric Dahlvang22-Aug-06 6:31
Eric Dahlvang22-Aug-06 6:31 
QuestionRemote Desktop connection Pin
prashanthmaalay22-Aug-06 0:47
prashanthmaalay22-Aug-06 0:47 
AnswerRe: Remote Desktop connection Pin
Guffa22-Aug-06 1:02
Guffa22-Aug-06 1:02 
AnswerRe: Remote Desktop connection Pin
Eric Dahlvang22-Aug-06 6:36
Eric Dahlvang22-Aug-06 6:36 
Questioniam writing one application in that project i read and send data to serial port in C# Pin
premkamalg21-Aug-06 23:47
premkamalg21-Aug-06 23:47 

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.