3,245
社区成员
发帖
与我相关
我的任务
分享
//position dialog relative to word insertion point (caret)
int left = 0;
int top = 0;
int width = 0;
int height = 0;
MSWord.Range r = Globals.ThisDocument.Application.Selection.Range;
MSWord.Window w = Globals.ThisDocument.ActiveWindow;
w.GetPoint( out left, out top, out width, out height, r );
frmPopUp newForm = new frmPopUp();
newForm.SetDesktopLocation( left + width + 2, top -
newForm.Height + height );