Make your own control: Part 2 Dallas TX

So, you have made your own control which keeps your program on top, but now you want people to know that it was you that made it. Your claim to fame!

Local Companies

elKore Inc
1-877-355-6731
12225 Greenville Avenue
Dallas, TX
Maxtrus Micro
(800) 910-2380
4781 Snow Dr
Mesquite, TX
C. Pitman Baker & Associates
972-579-1642 X 227
1431 Greenway Dr.
Irving, TX
P O Express Inc
(972) 272-0603
3717 Burning Tree Ln
Garland, TX
Freeman Software
(972) 840-1119
506 Valencia Dr
Garland, TX
Videotex Systems
972 231 9200 x124
10255 Miller Road
Dallas, TX
Information Processing Corporation
972-404-9244
13747 Montfort, Suite 300
Dallas, TX
Spatial Data Inc.
972-791-0911
4545 Fuller Drive
Irving, TX
In2 Solutions Inc
(972) 494-7400
3534 W Walnut St
Garland, TX
Sixred, Inc.
(972) 365-3437
15950 North Dallas Parkway
Dallas, TX

provided by: 
Originally published at Internet.com


This article continues from my last article "Making Your Own Control: Part 1".

So, you have made your own control which keeps your program on top, but now you want people to know that it was you that made it. Your claim to fame!

Well, as last time, load Visual Basic and choose "ActiveX Control" from the New Project dialog. Open up the code window for the control and go to the General Declarations procedure. Add this code which declares your name and web site address as a string: Private mvarauthor As String Private mvarURL As String

Now add these four pieces of code which store and retrieve the settings: Public Property Let URL(ByVal vData As String) mvarURL = vData End Property Public Property Get URL() As String URL = mvarURL End Property Public Property Let author(ByVal vData As String) mvarauthor = vData End Property Public Property Get author() As String author = mvarauthor End Property

Now add two labels to the control, and change the caption properties on each one to your name and web site address. e.g. Lblname.caption="Sam Huggill" LblURL.caption="http://www.vbsquare.com/"

Almost finished. Open the code window for the control and go to the controls Initialise procedure and add this code: Private Sub UserControl_Initialize() Me.author = lblName.Caption Me.URL = lblURL.Caption End Sub

Now click File, Make Project1.ocx. Select a directory for the file. Now, make a new project and click Project, Components. Click browse, go to the directory where the file is. Double click on the file and click OK. Draw the control onto the form and look at the properties. See, it works!

Author: Sam Huggill

Read article at Internet.com site

Featured Local Company

Videotex Systems

972 231 9200 x124
10255 Miller Road
Dallas, TX
http://www.videotexsystems.com/

Related Local Event
Unconventional Gas Conference & Exhibition
Dates: 9/29/2009 - 10/1/2009
Location: Fort Worth Convention Center
Fort Worth, TX
View Details