私のPPTアドインでは、WPFポップアップウィンドウを表示したいのですが、PPTウィンドウに従って中央に配置する必要があります。
ここに私のコードがあります:
// get the postion and size of ppt window
float winLeft = Globals.ThisAddIn.Application.Left;
float winTop = Globals.ThisAddIn.Application.Top;
float winWidth = Globals.ThisAddIn.Application.Width;
float winHeight = Globals.ThisAddIn.Application.Height;
// set the position of WPF window
this.Left = winLeft + (winWidth - this.Width) / 2;
this.Top = winTop + (winHeight - this.Height) / 2;
Globals.ThisAddIn.Applicationを使用して現在の PPT ウィンドウを取得できますが、どういうわけかLeft、Top、Width、およびHeightが画面上の実際のサイズと異なります (私の PC では値が小さくなっています)
ウィンドウ サイズを画面上の実際のサイズに変換する機能があるかどうか疑問に思っています