Send a suggestion!

We're building a brand new version of the site, and we'd love to hear your ideas

Members

Technology Zones

IBM Learning Center

Articles

Hosted By

MaximumASP

Info

Rated
Read 63,867 times

Contents

Related Categories

Creating Classes & ActiveX Controls - Introduction

Introduction

What are classes and controls? A control is something you put on a form, with methods (procedures and functions), properties, constants, and events. A class is basically the same, except you can't place it on a form, or set its properties at design-time.

Why should we use them? If you have a large project, have lots of people working on a project, or have a large number of little projects, you will find that there are portions of code that you are using over and over again. You will also find that you don't want co-programmers changing core parts of your project, which mean that you have to change hundreds of other lines of code too! Using classes and controls, you can break a project up into small, manageable portions. Controls and classes can also be compiled into DLL's or OCX controls, so people can use your code without seeing what is actually behind it, just like when you use the standard Microsoft controls. This is what VB web does when creating its free (and in this case, open source) controls and DLLs.

James first started writing tutorials on Visual Basic in 1999 whilst starting this website (then known as VB Web). Since then, the site has grown rapidly, and James has written numerous tutorials, articles and reviews on VB, PHP, ASP and C#. In October 2003, James formed the company Developer Fusion Ltd, which owns this website, and also offers various development services. In his spare time, he's a 3rd year undergraduate studying Computer Science in the UK. He's also a Visual Basic MVP.

Comments

  • Ocx in DLL

    Posted by zefonsec on 18 Jan 2005

    Is it possible for a dll to use an ocx and its methods? How do I declare it?

  • it was a great help

    Posted by heemang on 04 Nov 2004

    thanks!!! a great help for developers.









    --all glory to my great provider...--

  • A nice article

    Posted by ozgur on 13 Apr 2003

    Of all the books and tutorials I've read on classes & activeX,this should be the best.Thanx to the author.

  • Creating Classes

    Posted by GrimSleeper on 28 Feb 2002

    I am fairly new at coding in VB and love diving in. I am working on a project on reading binary files, parsing bit data information and creating a display from some function of bits. The first coupl...