View Single Post
  #2  
Old April 10th 09, 02:59 PM posted to microsoft.public.outlook.program_forms
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default VB6 to VB.Net Migration

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()

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"ArtisticPinoy" wrote in message
...
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?


Ads