I want to get the red point position in screen related to the yellow point which is the main window position in screen. Then i can show a form in that red position .Can anyone help me?
int nCurVport = System.Convert.ToInt32(Autodesk.AutoCAD.ApplicationServices.Application.GetSystemVariable("CVPORT"));
var acView = editor.GetCurrentView();
Point2d pCenter = acView.CenterPoint;
Point3d leftTop = new Point3d(pCenter.X - (acView.Width / 2), (acView.Height / 2) + pCenter.Y, 0);
System.Windows.Point screen_LeftTop = editor.PointToScreen(leftTop, nCurVport);
MessageBox.Show(screen_LeftTop.ToString());//this shows the red point is (0,0), but is not what i want