Home All Groups Group Topic Archive Search About

Personal function library

Author
22 Sep 2005 3:44 AM
LurfysMa
Is there a reasonably easy way to create a library of custom functions
that are written in VB6 and are then available to use in other VB6
programs?

From time to time I write useful little utility functions to do
specialized formatting or other processing. It would be very handy if
I could put them in some library so they would be available to any VB6
program I might write.

Thanks

--
For email, use Usenet-20031220@spamex.com

Author
22 Sep 2005 7:56 AM
Martin
Make a COM/ActiveX DLL with ur public functions
- U notice u cant make a module public so add the functions in a class
called e.g. Global
- Put the Instancing-properrty of the class to GlobalMultiUse, so u dont
need to instanciate the class. U can call the function directly

ML


Show quoteHide quote
"LurfysMa" <invalid@invalid.invalid> schreef in bericht
news:rt94j1ljfmh606ul590b0lnbn5g72irr99@4ax.com...
> Is there a reasonably easy way to create a library of custom functions
> that are written in VB6 and are then available to use in other VB6
> programs?
>
> From time to time I write useful little utility functions to do
> specialized formatting or other processing. It would be very handy if
> I could put them in some library so they would be available to any VB6
> program I might write.
>
> Thanks
>
> --
> For email, use Usenet-20031220@spamex.com
Are all your drivers up to date? click for free checkup

Author
22 Sep 2005 9:22 AM
J French
On Wed, 21 Sep 2005 20:44:51 -0700, LurfysMa <invalid@invalid.invalid>
wrote:

>Is there a reasonably easy way to create a library of custom functions
>that are written in VB6 and are then available to use in other VB6
>programs?
>
>From time to time I write useful little utility functions to do
>specialized formatting or other processing. It would be very handy if
>I could put them in some library so they would be available to any VB6
>program I might write.

Martin has shown you how to do what you want

However, be careful, unless you set up the DLL with Binary
Compatibility, every time you recompile it you'll find that the other
compiled EXEs start throwing errors

Personally I just keep frequently used routines in a number of Modules
and Classes and just add the Module/Class to all Projects that need
them.
Author
22 Sep 2005 2:20 PM
Ken Halter
"J French" <erew***@nowhere.uk> wrote in message
news:433276b7.3084401@news.btopenworld.com...
>
> Martin has shown you how to do what you want
>

He's also shown how 2 drive ppl (like u n me) nuts with abbreviations <g>
What.... we're chatting on cell phones here? Sheesh.

--
Ken Halter - MS-MVP-VB - http://www.vbsight.com
DLL Hell problems? Try ComGuard - http://www.vbsight.com/ComGuard.htm
Please keep all discussions in the groups..
Author
22 Sep 2005 3:24 PM
Martin
i am sorry you cant read my attempt to write english. if COM/ActiveX are
strange words for you try to read some more;)

Martin
Netherlands

P.S. Even with <g> it is offending

Show quoteHide quote
"Ken Halter" <Ken_Halter@Use_Sparingly_Hotmail.com> schreef in bericht
news:upSYaD4vFHA.2164@TK2MSFTNGP10.phx.gbl...
> "J French" <erew***@nowhere.uk> wrote in message
> news:433276b7.3084401@news.btopenworld.com...
> >
> > Martin has shown you how to do what you want
> >
>
> He's also shown how 2 drive ppl (like u n me) nuts with abbreviations <g>
> What.... we're chatting on cell phones here? Sheesh.
>
> --
> Ken Halter - MS-MVP-VB - http://www.vbsight.com
> DLL Hell problems? Try ComGuard - http://www.vbsight.com/ComGuard.htm
> Please keep all discussions in the groups..
>
>
Author
22 Sep 2005 3:36 PM
Bob Butler
"Martin" <ML@community.nospam> wrote in message
news:uCMpTq4vFHA.3400@TK2MSFTNGP14.phx.gbl
> i am sorry you cant read my attempt to write english. if COM/ActiveX
> are strange words for you try to read some more;)

it's not the technical terms, it's things like 'U' instead of 'You' and 'Ur'
instead of 'Your' that make it hard to read.   That sort of
over-abbreviation is jarring, at least to me, and I don't read past the
first sentence when posters use them.

--
Reply to the group so all can participate
VB.Net: "Fool me once..."
Author
22 Sep 2005 7:16 PM
Martin de Jong
Thats why i like The English Poem so much:)))

Well, isnt that all important anyway:))) Lets not argue abt it... ouch did i
say abt? ment about, sry(sorry) ;) Maybe i should quit with messenger:)


Chau Martin


Show quoteHide quote
"Bob Butler" <tiredofit@nospam.com> schreef in bericht
news:e21bZt4vFHA.2960@tk2msftngp13.phx.gbl...
> "Martin" <ML@community.nospam> wrote in message
> news:uCMpTq4vFHA.3400@TK2MSFTNGP14.phx.gbl
>> i am sorry you cant read my attempt to write english. if COM/ActiveX
>> are strange words for you try to read some more;)
>
> it's not the technical terms, it's things like 'U' instead of 'You' and
> 'Ur'
> instead of 'Your' that make it hard to read.   That sort of
> over-abbreviation is jarring, at least to me, and I don't read past the
> first sentence when posters use them.
>
> --
> Reply to the group so all can participate
> VB.Net: "Fool me once..."
>
Author
25 Sep 2005 4:53 PM
DanS
"Bob Butler" <tiredofit@nospam.com> wrote in
news:e21bZt4vFHA.2960@tk2msftngp13.phx.gbl:

> "Martin" <ML@community.nospam> wrote in message
> news:uCMpTq4vFHA.3400@TK2MSFTNGP14.phx.gbl
>> i am sorry you cant read my attempt to write english. if COM/ActiveX
>> are strange words for you try to read some more;)
>
> it's not the technical terms, it's things like 'U' instead of 'You'
> and 'Ur' instead of 'Your' that make it hard to read.   That sort of
> over-abbreviation is jarring, at least to me, and I don't read past
> the first sentence when posters use them.
>

similar to a gentlemen in a wireless group i frequent. this guy is on-the-
ball and knows his s**t.

his technical expertise is beyond reproach, and i'm sure that he has helped
out countless users, but.....he ALWAYS, ALWAYS, writes 'computer' as
'computah' which while a very minor thing, get's under my skin way more
than it should.

(hopefully, people don't hate posts written in all lower-case as well)
Author
26 Sep 2005 12:58 AM
Bob Butler
Show quote Hide quote
"DanS" <t.h.i.s.n.t.h.a.t@a.d.e.l.p.h.i.a..n.e.t> wrote in message
news:Xns96DC83CC333ABidispcom@216.196.97.142
> "Bob Butler" <tiredofit@nospam.com> wrote in
> news:e21bZt4vFHA.2960@tk2msftngp13.phx.gbl:
>
>> "Martin" <ML@community.nospam> wrote in message
>> news:uCMpTq4vFHA.3400@TK2MSFTNGP14.phx.gbl
>>> i am sorry you cant read my attempt to write english. if COM/ActiveX
>>> are strange words for you try to read some more;)
>>
>> it's not the technical terms, it's things like 'U' instead of 'You'
>> and 'Ur' instead of 'Your' that make it hard to read.   That sort of
>> over-abbreviation is jarring, at least to me, and I don't read past
>> the first sentence when posters use them.
>>
>
> similar to a gentlemen in a wireless group i frequent. this guy is on-
> the- ball and knows his s**t.
>
> his technical expertise is beyond reproach, and i'm sure that he has
> helped out countless users, but.....he ALWAYS, ALWAYS, writes
> 'computer' as 'computah' which while a very minor thing, get's under
> my skin way more than it should.

that's still better than the ones who write proggies for their 'puter!  It
makes it sound like a romper room special.

Show quoteHide quote
> (hopefully, people don't hate posts written in all lower-case as
> well)

--
Reply to the group so all can participate
VB.Net: "Fool me once..."
Author
22 Sep 2005 4:03 PM
Ralph
LOL

Ken, It be like maybe not possible to not offend somebody, somewhere,
someplace, somehow, no matter what is typed. <g>

Several months ago, after a long initial day of meeting the project leaders,
business stakeholders, gathering requirements, etc. I was ushered into the
CIO's office, and asked what I thought. In a momentary lapse of judgement I
jokingly remarked that the specs appeared written by a moron.

"Who wrote this crap?"
"I did."

And the rest was silence.
Author
22 Sep 2005 7:31 PM
Greg Teets
On Thu, 22 Sep 2005 09:22:12 +0000 (UTC), erew***@nowhere.uk (J
French) wrote:

>Personally I just keep frequently used routines in a number of Modules
>and Classes and just add the Module/Class to all Projects that need
>them.
I use the module approach  as well.  If you start to find that you use
some of a module's functions more often than others, you can spit up
the modules into smaller modules that contain similar functions.

To me, this is the easiest way of doing what you want to do.  Remember
that the key to doing it this way is to name your modules and
functions so that you can tell what each one does.  That will reduce
confusion as you get more modules and functions.  Also, don't forget
to put comments in your modules so that you can remind yourself of
things later.

Then I just call the functions I need from the utility module and I'm
set.

Greg in Cincinnati.
Author
22 Sep 2005 7:37 PM
Martin de Jong
true, and use sourcesafe to keep in sync:)

Show quoteHide quote
"Greg Teets" <gteet***@yahoo.com> schreef in bericht
news:6a16j1dbn2doanqfbnqnca9gpeog8m65cm@4ax.com...
> On Thu, 22 Sep 2005 09:22:12 +0000 (UTC), erew***@nowhere.uk (J
> French) wrote:
>
>>Personally I just keep frequently used routines in a number of Modules
>>and Classes and just add the Module/Class to all Projects that need
>>them.
> I use the module approach  as well.  If you start to find that you use
> some of a module's functions more often than others, you can spit up
> the modules into smaller modules that contain similar functions.
>
> To me, this is the easiest way of doing what you want to do.  Remember
> that the key to doing it this way is to name your modules and
> functions so that you can tell what each one does.  That will reduce
> confusion as you get more modules and functions.  Also, don't forget
> to put comments in your modules so that you can remind yourself of
> things later.
>
> Then I just call the functions I need from the utility module and I'm
> set.
>
> Greg in Cincinnati.
Author
23 Sep 2005 1:05 AM
LurfysMa
On Thu, 22 Sep 2005 09:22:12 +0000 (UTC), erew***@nowhere.uk (J
French) wrote:

Show quoteHide quote
>On Wed, 21 Sep 2005 20:44:51 -0700, LurfysMa <invalid@invalid.invalid>
>wrote:
>
>>Is there a reasonably easy way to create a library of custom functions
>>that are written in VB6 and are then available to use in other VB6
>>programs?
>>
>>From time to time I write useful little utility functions to do
>>specialized formatting or other processing. It would be very handy if
>>I could put them in some library so they would be available to any VB6
>>program I might write.
>
>Martin has shown you how to do what you want
>
>However, be careful, unless you set up the DLL with Binary
>Compatibility, every time you recompile it you'll find that the other
>compiled EXEs start throwing errors
>
>Personally I just keep frequently used routines in a number of Modules
>and Classes and just add the Module/Class to all Projects that need
>them.

That's what I have been doing. Aside from being a bit of an
inconvenience, they various copies get out of sync. I'd like a single
copy of the code, if possible.

--
For email, use Usenet-20031220@spamex.com
Author
23 Sep 2005 4:06 AM
Greg Teets
On Thu, 22 Sep 2005 18:05:28 -0700, LurfysMa <invalid@invalid.invalid>
wrote:

>That's what I have been doing. Aside from being a bit of an
>inconvenience, they various copies get out of sync. I'd like a single
>copy of the code, if possible.

See Martin's message about using SourceSafe.

Greg
Author
23 Sep 2005 8:54 AM
J French
On Thu, 22 Sep 2005 18:05:28 -0700, LurfysMa <invalid@invalid.invalid>
wrote:

<snip>

>>Personally I just keep frequently used routines in a number of Modules
>>and Classes and just add the Module/Class to all Projects that need
>>them.

>That's what I have been doing. Aside from being a bit of an
>inconvenience, they various copies get out of sync. I'd like a single
>copy of the code, if possible.

I keep a directory :

    c:\dev\uslib

The things that are 'shared' between radically different EXEs go in
there.

Obviously it means that one needs to be careful when tweaking a well
used function ...

If I am going to do something really radical, say to a UserControl
(which I include in projects rather than OCX), then I make a local
copy, work on that, and eventually 'promote' it to become the shared
copy.

It is not exactly bullet proof, but if one makes a zip of all source
used in an EXE each time one makes a release, then one has a 'cheapo'
form of version control.

I've only used a proper version of Version control in pre-Windows days
when eight of us were sharing library code.

The version control stuff itself was not that useful, as we had a
rigid 'code ownership' regime, where each library module had an
'owner' (the guy who wrote it) and a backup programmer.

If anyone else touched the shared source the punishment was a solid
kicking.
Author
23 Sep 2005 3:25 PM
Stefan Berglund
On Fri, 23 Sep 2005 08:54:24 +0000 (UTC), erew***@nowhere.uk (J French) wrote:
in <4333bf5a.87228***@news.btopenworld.com>

>It is not exactly bullet proof, but if one makes a zip of all source
>used in an EXE each time one makes a release, then one has a 'cheapo'
>form of version control.

Works like a charm with the added benefit of one less dependency on anything
Microsoft proprietary.  Hmmm, now that could become the basis for a new cult.
:-)

---
Stefan Berglund
Author
24 Sep 2005 9:58 AM
J French
On Fri, 23 Sep 2005 08:25:56 -0700, Stefan Berglund
<keepit@in.thegroups> wrote:

>On Fri, 23 Sep 2005 08:54:24 +0000 (UTC), erew***@nowhere.uk (J French) wrote:
> in <4333bf5a.87228***@news.btopenworld.com>

>>It is not exactly bullet proof, but if one makes a zip of all source
>>used in an EXE each time one makes a release, then one has a 'cheapo'
>>form of version control.

>Works like a charm with the added benefit of one less dependency on anything
>Microsoft proprietary.  Hmmm, now that could become the basis for a new cult.
>:-)

I also wrote something that investigates the contents of a VBP and
copies all the source to another directory structure

Very handy

Unfortunately the code is not very elegant, otherwise I'ld post it

I expect there are plenty of those lurking around anyway
Author
22 Sep 2005 4:53 PM
Jim Edgar
Show quote Hide quote
"LurfysMa" <invalid@invalid.invalid> wrote in message
news:rt94j1ljfmh606ul590b0lnbn5g72irr99@4ax.com...
> Is there a reasonably easy way to create a library of custom functions
> that are written in VB6 and are then available to use in other VB6
> programs?
>
> From time to time I write useful little utility functions to do
> specialized formatting or other processing. It would be very handy if
> I could put them in some library so they would be available to any VB6
> program I might write.
>
> Thanks
>
> --
> For email, use Usenet-20031220@spamex.com

For small code snippets I use MZ-Tools which stores the code and can be
inserted into any project.  Download MZ-Tools and add the code to the
templates tab.  If you want to create a larger set of utilities then put the
code in a dll like others have suggested.

Jim Edgar

Bookmark and Share