有没有办法啊!!急用!!!

解决方案 »

  1.   

    [System.Runtime.InteropServices.DllImport("Kernel32.dll",EntryPoint="CreateEvent")]
    public static extern int CreateEvent(IntPtr a,bool bManualReset,bool bInitialState,string strName); [System.Runtime.InteropServices.DllImport("Kernel32.dll",EntryPoint="GetLastError")]
    public static extern int GetLastError();
    [STAThread]
    static void Main() 
    {
    int Handle = CreateEvent(IntPtr.Zero,true,true,"Card");
    if(GetLastError()==183)
    return;
    Application.Run(new Form1());
    }
      

  2.   

    using System.Threading;
    bool bCreatedNew;
    //Create a new mutex using specific mutex name
     Mutex m =new Mutex( false, "yourprogramName", out bCreatedNew );
     if( bCreatedNew ) //未运行
              Application.Run(new yourFormName());
      

  3.   

    用SendMessage,可以参看
    http://dev.csdn.net/article/15/15598.shtm