StartPosition of ShowDialog in ADXForm

Add-in Express™ Support Service
That's what is more important than anything else

StartPosition of ShowDialog in ADXForm
 
Byung Kun Kim




Posts: 48
Joined: 2011-12-15
When I call ShowDialog(Me) in ADXOlForm, the new standard winform(StartPosition: CenterParent) is showed on center of ADXOlForm.


        Using checkForm As New CheckForUpdatesForm()
            checkForm.ShowDialog(Me)
        End Using


But I want to show my new standard winform on center of Outlook explorer window or Outlook inspector window, how can I do it?
Maybe need something of outlook window handle..?, but I wonder is there an easy way implemented in ADX.

1. I want to call and show a standard winform CeterParent of explorer/inspector windows calling in ADXOlForm.
2. I want to call and show a standard winform CeterParent of explorer/inspector windows calling in AddinModule.
Posted 25 Nov, 2016 12:06:51 Top
Andrei Smolin


Add-in Express team


Posts: 14140
Joined: 2006-05-11
Hello Byung,

You need to use the ShowDialog() version providing a parameter of the IWin32Window type; see https://msdn.microsoft.com/en-us/library/w61zzfwe(v=vs.110).aspx. Create an object implementing that interface and pass it to MessageBox.Show(). The interface allows you to provide the HWND of the window which is the parent window of the message box window. To get the HWND, you use the ADXAddinModule.GetOutlookWindowHandle() method.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 28 Nov, 2016 03:11:49 Top