[AccessD] TS_FrmProgressMeter

JWColby jwcolby at colbyconsulting.com
Fri Jan 26 14:18:10 CST 2007


Some of you may remember or use the progress meter designed by Carl Tribble
who used to be a list member back in the day.  I always wanted to place the
meter out in my framework library, hook it in to my framework and allow the
framework to open / close / manipulate the progress meter for me.  The issue
with doing that is that a form's CLASS cannot be returned from a function:
 
function MyPM() as form_TS_FrmProgressMeter.
end function
 
And in order to open a form multiple times, you have to reference the CLASS
behind the form using a dim statement something like:
 
dim frm as new form_MyFormName
 
The reason is that there is no way (that I can determine anyway) to make a
form's class public and viewable outside of the library.  If a class is not
public, then it cannot be used as a return variable type.
 
In an AHAH moment (or a "Duhhh... why didn't you do this years ago" moment)
I realized that I could strip all of the code out of Carl's code, place it
in a class, make THAT class public, have that class just open a the now
empty form (which still has all the controls on it) and save a pointer to
the form (so it doesn't close) and directly manipulate the controls on the
form.  This allows me to export / modify / import my clsPM module to make it
public, but work with a generic form object (Carl's old form, stripped of
it's code), which means I can now directly instantiate one of these progress
meter classes out in my application.  I used to have to save carl's form in
each application, which of course led to my making cool mods to his form but
not getting the changes propagated to all of my various FEs etc.
 
 
 
John W. Colby
Colby Consulting
www.ColbyConsulting.com
 



More information about the AccessD mailing list