Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Display a non-Modal form in a DLL
Message
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00905905
Message ID:
00906062
Views:
24
>[I don't code much in VB]
>
>I have a DLL written in VB, displays nothing when it runs. I want to change it to display a form with information that is updated as the DLL proceeds, in some cases, the DLL might be running for some time, and I need to know if it hung waiting for external events, or whether is is still actively processing data.
>
>I also need a way for the user to press a button to get it to stop activity and terminate gracefully.
>
>When I do a show form, I get
>
>Non-modal forms cannot be displayed in this host application from an ActiveX DLL, ActiveX Control, or Property Page...
>
>I can do a show vbModal but then it just sits and wait till the form is closed.

You cannot show a form from DLL, however you can communcate with the client application through raising events from your DLL. You will need to define your events, raise them at appropriate moment from DLL and receive the events in the client application using WithEvents. You can actually define only one event and just pass your different events and their values as parameters.
That will work just like you have a user interface with your COM DLL.

Or you can use out-of-process COM with a form, like others say.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform