コード例 #1
0
 internal void guessWindow(IGuesserListener listener, ManagedWinapi.Windows.SystemWindow window)
 {
     foreach (IWindowGuesser g in windowGuessers)
     {
         g.guess(listener, window);
     }
 }
コード例 #2
0
        void FindAndMoveMsgBox(string title, Form form)
        {
            //Moves a messagebox to the desired position
            Thread thr = new Thread(() => // create a new thread
            {
                IntPtr msgBox = IntPtr.Zero;
                // while there's no MessageBox, FindWindow returns IntPtr.Zero
                while ((msgBox = FindWindow(IntPtr.Zero, title)) == IntPtr.Zero) ;
                // after the while loop, msgBox is the handle of your MessageBox

                ManagedWinapi.Windows.SystemWindow msgBoxWindow = new ManagedWinapi.Windows.SystemWindow(msgBox);
                msgBoxWindow.Location = new Point(form.Location.X + (form.Size.Width - msgBoxWindow.Size.Width)/2, form.Location.Y + (form.Size.Height - msgBoxWindow.Size.Height)/2);
            });
            thr.IsBackground = true;
            thr.Start(); // starts the thread
        }
コード例 #3
0
ファイル: PointInfo.cs プロジェクト: floatas/highsign
 public PointInfo(PointF MouseLocation)
 {
     _MouseLocation = Point.Round(MouseLocation);
     _Window = ManagedWinapi.Windows.SystemWindow.FromPointEx(_MouseLocation.X, _MouseLocation.Y, true, false);
     _WindowHandle = _Window.HWnd;
 }
コード例 #4
0
ファイル: PointInfo.cs プロジェクト: Al-khwarizmi1/highsign
 public PointInfo(PointF MouseLocation)
 {
     _MouseLocation = Point.Round(MouseLocation);
     _Window        = ManagedWinapi.Windows.SystemWindow.FromPointEx(_MouseLocation.X, _MouseLocation.Y, true, false);
     _WindowHandle  = _Window.HWnd;
 }