Link to home
Start Free TrialLog in
Avatar of nyee84
nyee84

asked on

what is .cls file, .exp,.cls files in vb6

Qn1: What is .cls file and how can make use of the file in my vb6 program

Qn2: What is .exp and how do i use in my vb6 project...

Qn:3  What is .bas file .... what is the use

Since i am very new to vb6 please explain in detail.
Avatar of List244
List244

A .cls is a class, you can read about those here: (Read the first before the second)

http://edais.mvps.org/Tutorials/Classes/CLSch1.html
http://edais.mvps.org/Tutorials/AdvClass/index.html

A .bas file is normally used to hold public functions, that is functions which will be used by multiple forms of
your project.  That is to prevent you from having to have the same function placed in different places
throughout the project. Like if you needed to have a function for adding two numbers, you could put that in
the module like:

public function Add(N1 as integer, N2 as integer) as integer
   Add = N1+N2
end function

Now any form in your project can do:

Add(5,3) and get the result, or any other two numbers.

Another use of a .bas file however, is a program in itself.  If you create a project, remove the form, and add a bas module,
you can create a program which does not have a form. Like thoe following:

A .cls is a class, you can read about those here: (Read the first before the second)

http://edais.mvps.org/Tutorials/Classes/CLSch1.html
http://edais.mvps.org/Tutorials/AdvClass/index.html

A .bas file is normally used to hold public functions, that is functions which will be used by multiple forms of
your project.  That is to prevent you from having to have the same function placed in different places
throughout the project. Like if you needed to have a function for adding two numbers, you could put that in
the module like:

public function Add(N1 as integer, N2 as integer) as integer
   Add = N1+N2
end function
Public Sub main()
MsgBox Add(5, 3)
End Sub


This program would start up calling Sub main, and message box the value of 5+3.


''EXP AND LIVE FILES
https://www.experts-exchange.com/questions/20705749/What-are-EXP-and-LIB-files-which-are-created-along-with-DLL.html?query=exp+file&topics=93
SOLUTION
Avatar of List244
List244

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial