in my PPT Add in i want to display a WPF pop up window and it should be centered according to PPT window.
here's my code:
// 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;
i can obtain the current PPT window using Globals.ThisAddIn.Application and somehow Left , Top, Width, and Height are different to the actual size on the screen (in my PC, the values are smaller)
i am wondering if there's a conversion of window size to actual size on screen