Book a Demo

Author Topic: Addins and Modal forms  (Read 4440 times)

Martin Walke

  • EA User
  • **
  • Posts: 51
  • Karma: +0/-0
    • View Profile
Addins and Modal forms
« on: May 18, 2010, 09:59:16 pm »
Hi All,

I have an Addin written in VB6 that displays a form. I would like the form to be modeless i.e. be able to interact with EA whilst the form is being shown but I get an error about non-modal forms.

Does anyone know of a solution around this problem?

TIA
Martin

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Addins and Modal forms
« Reply #1 on: May 18, 2010, 10:03:21 pm »
Martin,

I seem to remember something like that back in the old VB days. If I'm not mistaken that is a common VB error that has nothing to do with EA.
I don't remember the solution to it, but I'm sure googling the exact error should give you an idea.

Geert

PS. It is possible to use both modal as non-modal forms in EA-addins. I've used both (in C#) without a problem.

Martin Walke

  • EA User
  • **
  • Posts: 51
  • Karma: +0/-0
    • View Profile
Re: Addins and Modal forms
« Reply #2 on: May 18, 2010, 10:11:57 pm »
Hi Geert,

According to most of the google searches, it's to do with the container that houses the form. When I'm running in (good old ;)) VB6, the IDE takes on the role of the parent container and therefore modeless forms are not a problem but EA doesn't seem to do that.

It may be that there's a project property that I have to set to allow this to happen. I've tried changing the 'Threading Model' from Apartment to Single as suggested but to an avail.

Many of the solutions talk about making it an ActiveX Document but then talk about running it from IE  :o


Martin

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Addins and Modal forms
« Reply #3 on: May 18, 2010, 10:24:13 pm »
Can you post the offending code, and the exact error message?
Maybe that'll trigger my memory.

Geert

Martin Walke

  • EA User
  • **
  • Posts: 51
  • Karma: +0/-0
    • View Profile
Re: Addins and Modal forms
« Reply #4 on: May 18, 2010, 10:44:19 pm »
Geert,

Thanks but after all that I've sorted it. I was creating an ActiveX DLL but really it should have been an ActiveX EXE.

Appears to works like a charm. Thanks for your help although this time not much input from you was needed ;D

Martin

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Addins and Modal forms
« Reply #5 on: May 18, 2010, 10:49:31 pm »
Ok Martin, happy you got it sorted out.

Geert