Click here to Skip to main content
11,413,676 members (69,438 online)
   

C#

 
AnswerRe: Need your opinion on querying data for presentation on winforms / web page and for reports Pin
Abhinav S, 8-May-13 22:13
mvpAbhinav S8-May-13 22:13 
Questionhow to develop a client server encrypt commincation using one time pad Pin
Member 10038068, 8-May-13 11:21
memberMember 100380688-May-13 11:21 
AnswerRe: how to develop a client server encrypt commincation using one time pad Pin
Eddy Vluggen, 8-May-13 11:54
mvpEddy Vluggen8-May-13 11:54 
GeneralRe: how to develop a client server encrypt commincation using one time pad Pin
Member 10038068, 8-May-13 12:04
memberMember 100380688-May-13 12:04 
GeneralRe: how to develop a client server encrypt commincation using one time pad Pin
Eddy Vluggen, 8-May-13 12:14
mvpEddy Vluggen8-May-13 12:14 
QuestionEffective Coding Style to build a Class Library Pin
Bikash Prakash Dash, 8-May-13 10:55
memberBikash Prakash Dash8-May-13 10:55 
AnswerRe: Effective Coding Style to build a Class Library Pin
Eddy Vluggen, 8-May-13 11:48
mvpEddy Vluggen8-May-13 11:48 
QuestionHelp with mutex, cannot get mutex to work Pin
turbosupramk3, 8-May-13 8:06
memberturbosupramk38-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 Pin
Jasmine2501, 8-May-13 8:38
memberJasmine25018-May-13 8:38 
GeneralRe: Help with mutex, cannot get mutex to work Pin
turbosupramk3, 8-May-13 8:49
memberturbosupramk38-May-13 8:49 
AnswerRe: Help with mutex, cannot get mutex to work Pin
Dave Kreskowiak, 8-May-13 9:10
mvpDave Kreskowiak8-May-13 9:10 
GeneralRe: Help with mutex, cannot get mutex to work Pin
turbosupramk3, 8-May-13 9:31
memberturbosupramk38-May-13 9:31 
GeneralRe: Help with mutex, cannot get mutex to work Pin
Jasmine2501, 8-May-13 9:35
memberJasmine25018-May-13 9:35 
GeneralRe: Help with mutex, cannot get mutex to work Pin
Dave Kreskowiak, 8-May-13 9:53
mvpDave Kreskowiak8-May-13 9:53 
GeneralRe: Help with mutex, cannot get mutex to work Pin
turbosupramk3, 10-May-13 2:58
memberturbosupramk310-May-13 2:58 
GeneralRe: Help with mutex, cannot get mutex to work Pin
Dave Kreskowiak, 10-May-13 3:17
mvpDave Kreskowiak10-May-13 3:17 
Questionlogin authentication Pin
geo thomas, 8-May-13 1:08
professionalgeo thomas8-May-13 1:08 
AnswerRe: login authentication Pin
Sivaraman Dhamodharan, 8-May-13 1:22
memberSivaraman Dhamodharan8-May-13 1:22 
GeneralRe: login authentication Pin
geo thomas, 8-May-13 1:30
professionalgeo thomas8-May-13 1:30 
GeneralRe: login authentication Pin
Dave Kreskowiak, 8-May-13 3:05
mvpDave Kreskowiak8-May-13 3:05 
GeneralRe: login authentication Pin
geo thomas, 8-May-13 21:06
professionalgeo thomas8-May-13 21:06 
GeneralRe: login authentication Pin
Dave Kreskowiak, 9-May-13 2:37
mvpDave Kreskowiak9-May-13 2:37 
GeneralRe: login authentication Pin
geo thomas, 9-May-13 20:00
professionalgeo thomas9-May-13 20:00 
Questionrunning asp.net website in a windows application Pin
mrkeivan, 7-May-13 23:25
membermrkeivan7-May-13 23:25 
AnswerRe: running asp.net website in a windows application Pin
Dave Kreskowiak, 8-May-13 3:06
mvpDave Kreskowiak8-May-13 3:06 

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.150427.2 | Last Updated 27 Apr 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid