Important alert: (current site time 7/16/2013 1:44:30 AM EDT)
 

winzip icon

_( Learn how to create and use DLL projects )_

Email
Submitted on: 5/13/2003 12:50:09 PM
By: Taher Ahmed 
Level: Beginner
User Rating: By 40 Users
Compatibility: VB 5.0, VB 6.0
Views: 44606
author picture
(About the author)
 
     Check it out.. This code is the simplest way to learn about Visual Basic DLL (ActiveX DLL) creating and using. Just 3 lines of code, and u got it running ;) Please Rate...
 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
  3. Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 2 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Beginner category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments

5/13/2003 1:06:39 PMabandoned_programmer

why r u riding a horse in the cloud?
(If this comment was disrespectful, please report it.)

 
5/13/2003 1:08:31 PMabandoned_programmer

just 3 lines of code?
u gotta be kidding...
there's not much u can do with 3 lines of code...
consider...
(If this comment was disrespectful, please report it.)

 
5/13/2003 1:09:32 PMabandoned_programmer

is that u in the pic riding the horse?
(If this comment was disrespectful, please report it.)

 
5/13/2003 1:23:00 PMChloe

A good demo I refer beginners to a lot is here:

http://planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=31550&lngWId= 1

While
it does not go over everything, it does a good job teaching a newbie of DLL's.
(If this comment was disrespectful, please report it.)

 
9/24/2003 4:23:52 PMAndrew Vos

King! Easiest example ive had to go through, That site mentioned above is much harder to understand, download this, I didnt and i came back two days later and eventually downloaded this, now i know how to use dlls,five globes rating
(If this comment was disrespectful, please report it.)

 
1/31/2004 9:43:24 AMNorm Cook

You Use use
(If this comment was disrespectful, please report it.)

 
1/31/2004 9:44:50 AMNorm Cook

Try again: You use "Private tstObject as New Whatever". The preferred method, for many reasons, is "Private tstObject As Whatever", then "Set tstObject = New Whatever"

(If this comment was disrespectful, please report it.)

 
2/20/2004 2:01:31 AMjoshsfba

I prefer the
"Private Obj as New ObjType" than

"Private Obj as ObjType ... then
Set tsObject = New ObjType"

It's a matter of preference. If MS didnt think it was sound, they wouldn't put that feature in.
(If this comment was disrespectful, please report it.)

 
5/14/2004 3:08:38 AM

thankyou
(If this comment was disrespectful, please report it.)

 
6/3/2004 11:29:45 PM

people complain complain complain, gee wizz people who are always talking and running there mouths. 3 lines of code is simply showing you HOW TO READ DLL'S you can implement code into that to work in the same fashion as you would using modules and coding in forms. This gives you an EASY understanding HOW to use dll's
(If this comment was disrespectful, please report it.)

 
6/5/2004 9:05:19 PMKevin Ritch

Your posting was absolutely perfect. Given this kick-off, I can do anything now. Thanks very much indeed.
(If this comment was disrespectful, please report it.)

 
6/5/2004 9:20:52 PMKevin Ritch

Dude,

The reason I needed this is because I have to work with the ACT! Database using ASP and under NT/IIS you get errors when working with their OCX using VBScript on an ASP Page.

But by creating the functionality in VB6 and calling the DLL, the problem is resolved.

Here's your code implemented in ASP where the DLL has been registered:

<%
Set objT=CreateObject("PrjName.CLSName")
Response.Write objTest.AWX(10)
Set objT=Nothing
%>

Thanks again,
Kevin@Ritch.com
ACT! Certified Consultant
(If this comment was disrespectful, please report it.)

 
6/5/2004 9:23:04 PMKevin Ritch

Should have read objT not objTest, sorry - typing err. ~K~
(If this comment was disrespectful, please report it.)

 
7/20/2004 5:00:02 AM

Great example ... take out the trees and you can really see the wood.

5 orbs from me
(If this comment was disrespectful, please report it.)

 
10/25/2004 7:39:46 AM

good
(If this comment was disrespectful, please report it.)

 
11/9/2004 11:05:14 PMRye

works without fault and is easy to use ... very easy to use, on that note i give you 5 globles, nice work
(If this comment was disrespectful, please report it.)

 
12/14/2005 1:59:46 PMPrakash

Hi Ahmed,

Its really nice to see the sample code. it will be more useful for beginners like me.
(If this comment was disrespectful, please report it.)

 
12/20/2005 5:49:33 PMWilliam

very simple and straightforward.
(If this comment was disrespectful, please report it.)

 
6/18/2006 9:35:56 PMLim kosal

i would like u to explan me about make dll file and how to use dll file,
send me by this e-mail kosal.lim@azcom.net.kh
please-----
thanks
(If this comment was disrespectful, please report it.)

 
12/13/2006 3:57:44 PMglenn

thanks 5 from me this is how this site should be small code easy to understand and it works once again 5
(If this comment was disrespectful, please report it.)

 
12/17/2006 7:53:10 AMBrian Ail

(Y) great job on starting me up.
I'll try that.

btw, what horse?
(If this comment was disrespectful, please report it.)

 
1/19/2007 6:30:03 AMbigbigdog

you starting me up
thank you
(If this comment was disrespectful, please report it.)

 
3/16/2008 8:46:41 AMLord Nibbler

Mate this Tutorial is awesome i have scoured the net looking to learn how to do just this, Very well explained.
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.