Solved

Create DLL with VB5

Posted on 1998-08-24
5
242 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

735 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