A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Problem display form from COM addin



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old October 13th 06, 01:00 PM posted to microsoft.public.outlook.program_addins
[email protected]
external usenet poster
 
Posts: 3
Default Problem display form from COM addin

In som environments I get an error when I try to display a user form
from a VB6 com addin in Outlook.

Run-time error '406':

Non-modal forms cannot be displayed in this host application from an
ActiveX DLL, ActiveX Control, or Property Page.


The code adds a button to the Standard toolbar. The eventhandler for
the button loads och show the user form.

Since the form has no parent window, I dont think it's posible to
display it as a modal form.

The code works just fine on some machines. I'm using Outlook 2003.

Please help!

  #2  
Old October 13th 06, 03:57 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Problem display form from COM addin

You can display any form modally even without an owner argument. It might
not end up at the top of the z-order unless you massage the z-order but you
certainly can do it.

You could also get the main Outlook window and use the hWnd for that to set
the owner of the form but you'd need to use the Win32 API's to do that with
no parent form, not pure VB code.

I'd also look into exactly what the differences are between the environments
where what you're doing works and where it doesn't work.

What sort of Inspector are you adding the button to: Outlook editor email,
WordMail, appointment, etc.?

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


wrote in message
ups.com...
In som environments I get an error when I try to display a user form
from a VB6 com addin in Outlook.

Run-time error '406':

Non-modal forms cannot be displayed in this host application from an
ActiveX DLL, ActiveX Control, or Property Page.


The code adds a button to the Standard toolbar. The eventhandler for
the button loads och show the user form.

Since the form has no parent window, I dont think it's posible to
display it as a modal form.

The code works just fine on some machines. I'm using Outlook 2003.

Please help!


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlook addin being called form Word [email protected] Add-ins for Outlook 1 October 3rd 06 11:51 PM
Addin problem during load chris ampofo Add-ins for Outlook 4 June 6th 06 03:32 PM
problem with installer for addin Claus Add-ins for Outlook 5 May 18th 06 01:08 PM
A different problem with Outlook Addin Ram Add-ins for Outlook 1 April 24th 06 03:31 PM
unload COM addin problem David Cebrian Add-ins for Outlook 3 February 9th 06 11:26 AM


All times are GMT +1. The time now is 12:56 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.