public void AutoConfirmRemoteGUI()
        {
            System.Threading.Thread.Sleep(1000);
            //Auto Confirm Remote Dialog
            IntPtr hwndRemote = SLLaserDeskUtility.FindWindow(null, "Remote Control");

            SLLaserDeskUtility.PostMessage(hwndRemote, SLLaserDeskUtility.WM_KEYDOWN, SLLaserDeskUtility.VK_RETURN, 1);

            System.Threading.Thread.Sleep(1000);
            IntPtr hwndLogIn = SLLaserDeskUtility.FindWindow(null, "SCANLAB laserDESK");

            SLLaserDeskUtility.PostMessage(hwndLogIn, SLLaserDeskUtility.WM_KEYDOWN, SLLaserDeskUtility.VK_RETURN, 1);
        }
Esempio n. 2
0
        private void BuildIntimer_Tick(object sender, EventArgs e)
        {
            try
            {
                int    GWL_STYLE = -16;
                UInt32 WS_POPUP  = 0x80000000;
                UInt32 WS_CHILD  = 0x40000000;

                IntPtr pMainWindow = Process.GetProcessesByName("SLLaserDesk")[0].MainWindowHandle;

                UInt32 style = SLLaserDeskUtility.GetWindowLong(pMainWindow, GWL_STYLE);
                style = (style | WS_CHILD) & (~WS_POPUP);
                SLLaserDeskUtility.SetWindowLong(pMainWindow, GWL_STYLE, style);
                SLLaserDeskUtility.SetParent(pMainWindow, apiPanel.Handle);


                //Auto Confirm Remote Dialog

                if (_firstTimeTrigger)
                {
                    _laserDesk.InitialLaserDesk();
                    System.Threading.Thread.Sleep(1000);
                    IntPtr hwndRemote = SLLaserDeskUtility.FindWindow(null, "Remote Control");
                    //UInt32 style2 = SLLaserDeskUtility.GetWindowLong(hwndRemote, GWL_STYLE);
                    //style2 = (style2 | WS_CHILD) & (~WS_POPUP);

                    //SLLaserDeskUtility.SetWindowLong(hwndRemote, GWL_STYLE, style2);
                    SLLaserDeskUtility.ShowWindow(hwndRemote, SLLaserDeskUtility.WindowShowStyle.Show);
                    SLLaserDeskUtility.SetParent(hwndRemote, apiPanel.Handle);
                    SLLaserDeskUtility.SendMessage(hwndRemote, SLLaserDeskUtility.WM_SYSCOMMAND, SLLaserDeskUtility.SC_MAXIMIZE, 0);
                    _firstTimeTrigger = false;
                }
            }
            catch
            {
            }
        }