Click here to Skip to main content
       

C#

 
GeneralRe: Performance issue using Multi threading in Net 3.5 Pinmemberharold aptroot8-May-13 22:44 
GeneralRe: Performance issue using Multi threading in Net 3.5 PinmemberKIDYA9-May-13 0:25 
GeneralRe: Performance issue using Multi threading in Net 3.5 Pinmemberharold aptroot9-May-13 0:37 
GeneralRe: Performance issue using Multi threading in Net 3.5 PinmemberKIDYA9-May-13 1:08 
QuestionNeed your opinion on querying data for presentation on winforms / web page and for reports PinmemberNayan Ambaliya8-May-13 16:03 
QuestionRe: Need your opinion on querying data for presentation on winforms / web page and for reports PinmvpRichard MacCutchan8-May-13 21:43 
AnswerRe: Need your opinion on querying data for presentation on winforms / web page and for reports PinmvpAbhinav S8-May-13 22:13 
Questionhow to develop a client server encrypt commincation using one time pad PinmemberMember 100380688-May-13 11:21 
AnswerRe: how to develop a client server encrypt commincation using one time pad PinmvpEddy Vluggen8-May-13 11:54 
GeneralRe: how to develop a client server encrypt commincation using one time pad PinmemberMember 100380688-May-13 12:04 
GeneralRe: how to develop a client server encrypt commincation using one time pad PinmvpEddy Vluggen8-May-13 12:14 
QuestionEffective Coding Style to build a Class Library PinmemberBikash Prakash Dash8-May-13 10:55 
AnswerRe: Effective Coding Style to build a Class Library PinmvpEddy Vluggen8-May-13 11:48 
QuestionHelp with mutex, cannot get mutex to work Pinmemberturbosupramk38-May-13 8:06 
This always returns true, whether I have notepad open or not, can anyone tell me what I'm doing wrong?
 

if (IsSingleInstance())
           {
               Application.EnableVisualStyles();
               Application.SetCompatibleTextRenderingDefault(false);
               Application.Run(new Form1(Args));
           }
           else
           {
               Process current = Process.GetCurrentProcess();
               foreach (Process process in Process.GetProcessesByName(current.ProcessName))
               {
                   if (process.Id != current.Id)
                   {
                       SetForegroundWindow(process.MainWindowHandle);
                       break;
                   }
               }
           }
 

static Mutex _m;
 
 
[STAThread]
        static void Main(string[] Args)
        {
 
static bool IsSingleInstance()
    {
        try
        {
            // Try to open existing mutex.
            Mutex.OpenExisting(@"Global\Notepad");
        }
        catch
        {
            // If exception occurred, there is no such mutex.
            Program._m = new Mutex(true, "Notepad");
 
            // Only one instance.
            return true;
        }
        // More than one instance.
        return false;
    }
}

AnswerRe: Help with mutex, cannot get mutex to work PinmemberJasmine25018-May-13 8:38 
GeneralRe: Help with mutex, cannot get mutex to work Pinmemberturbosupramk38-May-13 8:49 
AnswerRe: Help with mutex, cannot get mutex to work PinmvpDave Kreskowiak8-May-13 9:10 
GeneralRe: Help with mutex, cannot get mutex to work Pinmemberturbosupramk38-May-13 9:31 
GeneralRe: Help with mutex, cannot get mutex to work PinmemberJasmine25018-May-13 9:35 
GeneralRe: Help with mutex, cannot get mutex to work PinmvpDave Kreskowiak8-May-13 9:53 
GeneralRe: Help with mutex, cannot get mutex to work Pinmemberturbosupramk310-May-13 2:58 
GeneralRe: Help with mutex, cannot get mutex to work PinmvpDave Kreskowiak10-May-13 3:17 
Questionlogin authentication Pinprofessionalgeo thomas8-May-13 1:08 
AnswerRe: login authentication PinmemberSivaraman Dhamodharan8-May-13 1:22 
GeneralRe: login authentication Pinprofessionalgeo thomas8-May-13 1:30 
GeneralRe: login authentication PinmvpDave Kreskowiak8-May-13 3:05 
GeneralRe: login authentication Pinprofessionalgeo thomas8-May-13 21:06 
GeneralRe: login authentication PinmvpDave Kreskowiak9-May-13 2:37 
GeneralRe: login authentication Pinprofessionalgeo thomas9-May-13 20:00 
Questionrunning asp.net website in a windows application Pinmembermrkeivan7-May-13 23:25 
AnswerRe: running asp.net website in a windows application PinmvpDave Kreskowiak8-May-13 3:06 
AnswerRe: running asp.net website in a windows application PinmvpAbhinav S8-May-13 22:22 
QuestionIIS security settings and different permission Pinmemberashabhatt27077-May-13 20:52 
SuggestionRe: IIS security settings and different permission PinmvpRichard MacCutchan7-May-13 22:14 
Questionsave time with the desired date Pinmemberdemoninside97-May-13 19:38 
AnswerRe: save time with the desired date Pinmemberdemoninside97-May-13 21:05 
AnswerRe: save time with the desired date PinmvpRichard MacCutchan7-May-13 22:06 
QuestionUser defined functions for Excel 2010 in .NET: args linked to cells don't work PinmemberPozzaVecia7-May-13 12:02 
AnswerRe: User defined functions for Excel 2010 in .NET: args linked to cells don't work PinmvpDave Kreskowiak7-May-13 16:10 
AnswerRe: User defined functions for Excel 2010 in .NET: args linked to cells don't work PinmemberPozzaVecia7-May-13 19:48 
GeneralRe: User defined functions for Excel 2010 in .NET: args linked to cells don't work PinmvpDave Kreskowiak8-May-13 3:14 
QuestionSolution Explorer to be shown on the toolbar Pinmemberindian1437-May-13 8:15 
AnswerRe: Solution Explorer to be shown on the toolbar PinmvpDave Kreskowiak7-May-13 8:41 
GeneralRe: Solution Explorer to be shown on the toolbar PinprofessionalT Pat7-May-13 21:00 
AnswerRe: Solution Explorer to be shown on the toolbar PinprotectorPete O'Hanlon7-May-13 9:16 
AnswerRe: Solution Explorer to be shown on the toolbar PinmemberMember 100361728-May-13 4:07 
GeneralRe: Solution Explorer to be shown on the toolbar PinprotectorPete O'Hanlon8-May-13 4:47 
QuestionBackground worker with progress bar timing issue PinmemberBlubbo7-May-13 6:02 
AnswerRe: Background worker with progress bar timing issue PinmvpEddy Vluggen7-May-13 10:28 
AnswerRe: Background worker with progress bar timing issue PinprofessionalMatt T Heffron7-May-13 12:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web02 | 2.8.1411023.1 | Last Updated 27 Nov 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid