free site statistics

Creating .DLL Project Using Visual Basic 6.0 - Programming Tricks

Published 7 years ago by LankaTricks
Creating .DLL Project Using Visual Basic 6.0 - Programming Tricks

Creating .DLL Project Using Visual Basic 6.0 - Programming Tricks

Visual Basic is a third-generation event-driven programming language. and A user-friendly programming language designed for beginners, and it enables anyone to develop GUI window applications easily. Visual Basic 6.0 (VB) is the one of powerful computer programming language developed by Microsoft corporation. In Visual Basic 6.0, programmer uses a graphical user interface (GUI) to choose and modify pres elected sections of code written in the BASIC programming language.

This tutorial going to talk about how to make Visual Basic 6.0 .Dll project easily. By Using Following steps you can make .dll project.

01) Open Visual Basic 6.0 IDE
02) Select new Project and select ActiveX dll.
03) Name the project you like name that name will be the name of the library to reference to.
04) The project comes default with a public class named Class1.
05) Change that name of the class to something more useful for you project.

Note: All the public methods and properties you added in that class will be exposed by the library.

06) Add your code in the class file as follows.


Private Sub Swap(ByRef x As Integer, ByRef y As Integer)
Dim temp As Integer
temp = x
x = y
y = temp
End Sub

07) You can make .dll file by using path of  File -> Make ClassName.dll  and Save it in your computer.

Now you can end of creating your Active X .dll file making project. Now you can test the you made library. To test the library, you should make new project. for that go to File -> Add Project -> create a new exe project.

Then you can add you made library for your new project.For that go to Project -> References . Now you can browse your dll file for your new project. To use the class file first make a intents of the class for your new project.For that you can write following code.

Dim Obj as new ProjectName.ClassName

Then you can use your class contain method in new project as follows.


Dim obj As New ProjectName.ClassName
Dim a As Integer
Private Sub Form_Load()
a = obj.swap(10, 20)
End Sub

 

According to the above thing you can add any code in vb6 as dll file and include it for any project you make.

 

 

 


– The contents we publish on this website regarding the professional and educational courses are extracted from various sources, such as newspaper advertisements, circulars, and websites. The right to this information belongs to the first owner of the information. If any alteration happens to this information, we don’t take the responsibility arising from such alteration. Instead, we do inform you as soon as possible regarding the updated information related to professional and educational courses. Also, we allow access you to gain essential knowledge related to competitive exams.

Related Posts

Blogging Advantages and Disadvantages Guide

Blogging Advantages and Disadvantages Guide

Published 4 years ago by LankaTricks

Do you need to write your own Blog? or Do you already have your own Blog? If “Yes“, Then this guide is vary impotent for you, And, this guide explains about Blogging Advantages and Disadvantages. This is our first tutorial about Blogging and Many tutorials will come forward. So keep on staying with us. Blogging Meaning –…

KnowledgeTutorials
Advanced Level Business Studies Past Papers - A/L BS

Advanced Level Business Studies Past Papers - A/L BS

Published 6 years ago by LankaTricks

When studying for the Advanced Level examination in Sri Lanka.Most of student selected subject in the commerce subject stream is  Business Studies. So, Business studies is  a course or area of study that teaches the principles of business, management, and economics. Here, Lankatrcks Website provides you to same of Advanced Level Business Studies Past Papers to follow…

A/L Pass PapersA/L Tutorials
SLAS Exam Guide - Paripalana Sewa - Lesson 04

SLAS Exam Guide - Paripalana Sewa - Lesson 04

Published 7 years ago by LankaTricks

This is the Lesson 4 of SLAS Exam Guide tutorial published on Dinamina Newspaper and Author of this lesson series is Anusha Gukula Pernando. SLAS (Sri Lanka Administrative Service) Exam tutorials Which were published on this Dinamini Sri Lankan news paper and there are thousands of people enter in to Sri Lanka Administrative service by…

SLAS ExamTutorials
Discover the Best Keywords for Your Website

Discover the Best Keywords for Your Website

Published 4 years ago by LankaTricks

Do you want to get more visitors to your website? or Do you need to rank your website on the First page of Google? Then this step is very impotent for you. In this article, we discuss the first step of getting visitors to your website. This step is finding good keywords related to your…

TutorialsWeb Development
Software Engineering Basic Lesson

Software Engineering Basic Lesson

Published 6 years ago by LankaTricks

Software Engineering In this we can learn basic concepts and theories about software Engineering in brief.This Lesson will help for Advanced level IT Subject and also People who like to Start learning Software Engineering.     What is software engineering? – An engineering discipline that is concerned with all aspects of software production – Software…

Knowledge
How to Build an Online Store Step by Step 2020

How to Build an Online Store Step by Step 2020

Published 4 years ago by LankaTricks

Do you need to build your own online store by yourself? All of us know building an online store is a not easy task or not a small task. Especially, if you do not have a good knowledge of web design and development, you have to face lots of problems in design and developing an…

TutorialsWeb Development