示例#1
0
 void BtnSetting_Click(object sender, EventArgs e)
 {
     if (WinOptionSetting.isHave == false)
     {
         setting = new WinOptionSetting(Lync);
         setting.Show();
     }
     //modify by 00327190  2015/7/14  如果已经打开,再次按此按钮则显示画面
     //Click the button to show the window again if the window was opened  already
     else
     {
         Window frm = setting;
         frm.Focus();
         //获取该界面句柄  //Get handle of the interface
         IntPtr hwnd = new WindowInteropHelper(setting).Handle;
         //显示窗体    //show the window
         ShowWindow(hwnd, 1);
     }
 }
 void BtnSetting_Click(object sender, EventArgs e)
 {
     if (WinOptionSetting.isHave == false)
     {
         setting = new WinOptionSetting(Lync);
         setting.Show();
     }
     //modify by 00327190  2015/7/14  如果已经打开,再次按此按钮则显示画面
     //Click the button to show the window again if the window was opened  already
     else
     {
         Window frm = setting;
         frm.Focus();
         //获取该界面句柄  //Get handle of the interface
         IntPtr hwnd = new WindowInteropHelper(setting).Handle;
         //显示窗体    //show the window
         ShowWindow(hwnd, 1);
     }
 }