free site statistics

Creating .DLL Project Using Visual Basic 6.0 - Programming Tricks

Published 6 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

Paripalana Sewa - SLAS Exam Guide - Lesson 14

Paripalana Sewa - SLAS Exam Guide - Lesson 14

Published 6 years ago by LankaTricks

SLAS Exam Guide tutorial published on Dinamina Newspaper and Author of this lesson series is Anusha Gukula Pernando. and This is the Lesson 14 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 referring…

SLAS ExamTutorials
2012 Dharmacharya Exam - Buddhist History and Culture Paper

2012 Dharmacharya Exam - Buddhist History and Culture Paper

Published 4 years ago by LankaTricks

  2012 Dharmacharya Exam – Buddhist History and Culture Paper Considering the Buddhist learning place in Sri Lanka, Daham Pasal is the best place to provide that knowledge to student. So, The vary impotent exam of Daham Pasal is dharmacharya exam and also this examination result prioritize the people to giving government job also. In This…

Daham Pasal ExamDharmacharya examE Thaksalawa
ICT - 2017 Advanced Level Exam Paper (Sinhala Medium)

ICT - 2017 Advanced Level Exam Paper (Sinhala Medium)

Published 4 years ago by LankaTricks

ICT – 2017 Advanced Level Exam Paper (Sinhala Medium) Considering the All Subject Stream of Advanced Level Examination in Sri Lanka, Information and Communication Technology is the one of Major subject which can follow by the Students and also This is available for study with any subject stream. The Meaning of ICT as follows ICT…

A/L Pass PapersA/L TutorialsE ThaksalawaICT
Tips for writing an outstanding cover letter

Tips for writing an outstanding cover letter

Published 5 years ago by LankaTricks

Lankatricks provide you to many of tutorials related to finding a good jobs. In this post you are going to learn how to write an outstanding cover letter. This will help you to achieve a your dream of getting a best new job. Tips for writing an outstanding cover letter   When you have finished write…

Career AdviceKnowledge
Paripalana Sewa - SLAS Exam Guide - Lesson 15

Paripalana Sewa - SLAS Exam Guide - Lesson 15

Published 6 years ago by LankaTricks

SLAS Exam Guide tutorial published on Dinamina Newspaper and Author of this lesson series is Anusha Gukula Pernando. and This is the Lesson 15 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 referring…

SLAS ExamTutorials
Advanced Level Economics Pass Papers - A/L Econ

Advanced Level Economics Pass Papers - A/L Econ

Published 5 years ago by LankaTricks

Advanced Level economics is one of main subject which any student who are studying in Arts or Commerce subject stream can follow. So, This subject impotent not only as a Advanced Levels Exam Subject  but also important to understand what is going on the Economy of countries and also world. Here, Lankatricks.com website gives you…

A/L Pass PapersA/L Tutorials