I'm using the NTaskDialog at the moment for replacing the standard message box support. Works great for this. I'd like to position this message box a specific place on the screen. I mainly need to do this because I'd like to show a message centered over my NDocument window. The TaskDialogDisplayPosition.CenterParent centers over the whole application when the NTaskDialog owner is an NDocument.
I noticed I can do this:
NTaskDialog dlg = new NTaskDialog();
... fill in dlg contents, etc.
dlg.DisplayPosition = TaskDialogDisplayPosition.Manual;
NRectangle nrect = new NRectangle();
nrect.X = 100; nrect.Y = 100;
I then can call dlg.Show(owner, nrect);
However, unless I also specify the nrect.Width and nrect.Height to be non-zero my position is not used and its centered on the screen instead. I'd like to know the NTaskDialog's height and width in calculating the correct position. How can I determine its width and height before calling NTaskDialog.Show() ?
Obviously, I can stop using the NTaskDialog and write my own message box form but you've gone to all this effort and I'd like to take advantage of your work.