The code is for showing a dialog box much like when you click on
Help...About. Originally, the code was oSetup.Show in VB6.
But after migrating the project to VB.Net, I got an error on this line and I
got a suggestion to use oSetup.ShowDialog() and setting the Owner property of
the form to Support UI Automation. So the question i posed was "What is the
code for setting the Form.Owner's property to support UI Automation?"
wrote:
> There's something else going on, ShowDialog() is a modal call, not
> non-modal. To display the form non-modally you would call Show(), not
> ShowDialog().
> You do get an error if you try to show a non-modal form when a modal form is
> open, but that's not the case here.
> In what context is this dialog being displayed? Are any other forms open
> either modally or non-modally?
> Does it make a difference at all if you structure your code like this?
> Dim oSetup As New frmSetup
> oSetup.ShowDialog()
> >
>
> "ArtisticPinoy" <ArtisticPinoy> wrote in message
> news:885C33CC-DDC0-454D-9832-A926C6929E88@microsoft.com...
> >I have a VB6 Outlook Add-in that has been in production. I tried migrating
> >it
> > to Vb.Net. Now I get this error "Non-modal forms cannot be displayed in
> > this
> > host application" when I execute this code:
> > Dim oSetup As frmSetup
> > oSetup.ShowDialog() 'error here
> > What is the work-around please?
> >
>