Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Create DLL with VB5

Posted on 1998-08-24
5
Medium Priority
?
268 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 14

Accepted Solution

by:
waty earned 800 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
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…
Suggested Courses

661 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