[Last Call] Learn how to a build a cloud-first strategyRegister Now


How to use forms in a DLL?

Posted on 2011-10-25
Medium Priority
Last Modified: 2012-05-12
I am developing an ActiveX DLL and I need to use forms in some functions, I don´t know if forms are used as same as a simple .exe application.

The idea is to open a form in which will be some buttons with their events handled.

Question by:dimensionav
  • 2

Expert Comment

ID: 37029493
Can you please tell me which version vb you are currently using?
If you are using VB.Net then you can create form in library file and then add reference this file DLL file into you your project (where you want to open this form) . Add import statement by using same namespace that used in DLL project. Now the form class is available in your code your can create its object and then call its Show() method to show the form.


Author Comment

ID: 37029567

I am using VB6 SP6

Expert Comment

ID: 37029803
If you are using VB6 then you can get form by its name after adding its reference. is it?
LVL 16

Accepted Solution

HooKooDooKu earned 2000 total points
ID: 37030671
You can create forms in a DLL just like you can in an exe.

Simply start up a new ActiveXDLL project.  Where an exe would create a project with a single form, the ActiveXDLL will create a project with a single class.  But all you have to do is click on the "Project" menu, and you will see that you can "Add Form" as well as most other items (Class, User Control, Module, etc) to the project.

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question