Solved

Create DLL with VB5

Posted on 1998-08-24
5
208 Views
Last Modified: 2011-09-20
How an I create a NORMAL (not ActiveX) DLL with VB5.0 EE?

I want: (IF POSSIBLE)

Declare MyFun lib "xxx.dll" (x as xxx) as xxx
in the declaration part of my module

and
xxx = MyFun(x)

to be the only lines of code I need to write to get the function working.
0
Comment
Question by:polygon
  • 2
  • 2
5 Comments
 
LVL 14

Accepted Solution

by:
waty earned 200 total points
ID: 1430657
It is not possible to create a "classic" DLL under VB5.

You could create an OLE 2 Server exporting classes, and within those classes, showing your functions.

I will find a sample and post it for you.
0
 
LVL 14

Expert Comment

by:waty
ID: 1430658
NB : I have a sample, you can find it on my web site :
  http://www.geocities.com/ResearchTriangle/6311/

Download the Gradient TitleBar. It is a complete VB Source code implementing gradient in the titlebar.

It is in fact an Active DLL exporting a class (class_TitleBar).
In the sample, we add a reference to this Active DLL, and in code, we create a variable of this class :
   Private m_cT As New class_TitleBar

After that, you can call functions inside :
   m_cT.Picture = picLogo
   m_cT.GradientForm Me
   m_cT.RefreshTitleBar

You can call this DLL from every langage supporting OLE2 (Delphi, Office, Powerbuilder...). One restriction is that you need to install the Runtime DLL of VB5
0
 
LVL 6

Expert Comment

by:clifABB
ID: 1430659
It is not possible with VB (waty's example is an activex dll).
However, there is an application that will allow you to write true dlls using a BASIC syntax.  Check out PB/DLL from power basic (www.powerbasic.com)
0
 
LVL 6

Expert Comment

by:anthonyc
ID: 1430660
EWWW Stay away, FAR AWAY, from Powerbasic.  It's unstable, and produces DLLs that are unstable.
0
 
LVL 6

Expert Comment

by:clifABB
ID: 1430661
I would except the GFA Basic no longer exists (in the US, at any rate).
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we 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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now