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

Best Place to Learn any Subject Online for Sri Lanka Peoples

Best Place to Learn any Subject Online for Sri Lanka Peoples

Published 5 years ago by LankaTricks

Do you have a dream to follow good courses? or Do you have idea to follow courses but not have enough money for pay that courses. or Do you like to follow course in your home without going any classes? If you have a one of above problem. Then this post specially for you. Here,…

Knowledge
Neluwa Duwili Ella Waterfall

Neluwa Duwili Ella Waterfall

Published 9 months ago by LankaTricks

Duwili Ella is located in the Neluwa Divisional Secretariat Division in the Galle District. Its height is about 25 meters. This is one of the most beautiful waterfalls in the Sinharaja Rain Forest. The Sinharaja Rain Forest consists of 19 waterfalls, and out of these waterfalls, 11 are located in the Galle District...

Travel Destinations
Samanya Danima - 1350 Question For Government Competitive Exams in Sri Lanka

Samanya Danima - 1350 Question For Government Competitive Exams in Sri Lanka

Published 6 years ago by LankaTricks

If you are facing Sri Lanka Government Competitive Exams of selecting government jobs like SLAS or Other exams. Then you need to knowledge about Samanya Danima (General Knowledge Questions ). This is tutorial for you. You can get many knowledge about General Knowledge and This PDF contain 1350 General Knowledge Questions. And This Queations was…

SLAS ExamTutorials
Paripalana Sewa - SLAS Exam Guide - Lesson 13

Paripalana Sewa - SLAS Exam Guide - Lesson 13

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 13 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
Ravana Waterfall - One of the most popular travel destinations in Ella, Sri Lanka

Ravana Waterfall - One of the most popular travel destinations in Ella, Sri Lanka

Published 8 months ago by LankaTricks

Ravana Waterfall is a part of the Ravana Ella Wildlife Sanctuary. It is located on Ella - Wellawaya road, around 6 km from the Ella Railway Station. Otherwise, travelers can reach Ravana Waterfall by traveling 10 km towards Wellawaya from Kubalwela junction in Badulla - Bandarawela road. This waterfall can be viewed from the main road. Kirindi Oya originates from the south of Bandarawela in the Badulla District based on Ravana Waterfall.

Travel Destinations
Best Youtube Money sinhala Tutorial PDF

Best Youtube Money sinhala Tutorial PDF

Published 6 years ago by LankaTricks

Earning money from Internet is a one of best way of earning money at present. So, There are many ways for  earning money by Internet such as Affiliate Marketing, Selling on Amazon, eBay, and Etsy, Blogging, Niche E-commerce,Your Own YouTube Channel and etc. This tutorial about one of best way of E money methods called…

Tutorials