How to make an inherited form to bring a custom method ?

Hi Experts

 How to make an inherited form to bring a custom method?
 I've created a form with some custom methods - and put it at the class library.
 After I've created the methods directly in the inherited class to Be.
 After it's been the custom methods inherited Are not there, any workaround?

 Thanks in advance.
Eduardo FuerteDeveloper and AnalystAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

AndrewJenCommented:
IN the inherited forms custom class, try:

DODEFAULT()
0
pcelbaCommented:
Inherited methods are not copied to the child classes or forms but you may see them when pressing the "View Parent code" button in method editor.

If you don't enter any code into the child form or class then the code from the parent is executed automatically. If you enter some code to the child form method then the parent code isn't executed but you may call it by DODEFAULT() function.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
AndrewJenCommented:
Are you creating your new form based upon your class? You have to go to the Tools/Options/Forms  menu and set your Template Class Form to be the class that you have created.
0
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

Eduardo FuerteDeveloper and AnalystAuthor Commented:
Hello

These pictures points out how did I created the class and the inherited form that didn´t have the method I've created in the class. The method simply doesn't appear (so the "View Parent code" isn't accessible)
 Image 1 Image2
0
AndrewJenCommented:
Do you have more than one copy of your class library, perhaps in another folder in the path, that you may inadvertently be calling or modifying?
0
pcelbaCommented:
The empty list on your picture is correct. Your TESTE form does not contain any custom method you could remove or rename because they all belong to the class (and the topmost dialog window does not allow anything else).

If you are interested in methods from your parent class which you could see then look at Methods in Properties window which is behind the Command window.

0
Eduardo FuerteDeveloper and AnalystAuthor Commented:
No, I've created this class immediately before create the form.
0
AndrewJenCommented:
Yes, I see what pcelba is saying. The method would already be in your properties window, it won't be in the dialog that you are showing, that's only for creating or editing methods or properties in the current form, not inherited ones.
0
Eduardo FuerteDeveloper and AnalystAuthor Commented:
The point is, I've created a custom method in the form class that wasn't inherited to the inherited form making impossible to see the parent's code. If it was created it would be showed at the dialog  at picture 2.
All the controls in the class are inherited at the form but the custom methods aren't created
at the class of the form itself aren't inherited. Image 3
0
Eduardo FuerteDeveloper and AnalystAuthor Commented:
Sorry, I've not read the Pcelba 10:30 reply before send my last scrap
0
Eduardo FuerteDeveloper and AnalystAuthor Commented:
Pcelba

That works, fine  !

Just one more thing how to access the custom form's class properties at inherited form ?
That was put at class form's

thisform.foutil = CREATEOBJECT("cls_Util")
thisform.fodb   = CREATEOBJECT("cls_db")

How could I access them ?
0
AndrewJenCommented:
You're question appears to have the answer

thisform.foutil.this_property
thisform.fodb.that_propery

etc.
0
Eduardo FuerteDeveloper and AnalystAuthor Commented:
If I put

this.foutil = CREATEOBJECT("cls_Util")
this.fodb   = CREATEOBJECT("cls_db")

at the form class aparently everything goes fine.
0
pcelbaCommented:
Yes, if class properties are created as public (default behavior) then you may access them as if they would created in the form directly. Another option is protected or hidden property which is not accessible from the form instance.

"THIS.foutil" has exactly same meaning as "THISFORM.foutil"  in any method created in the form or form class.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
FoxPro

From novice to tech pro — start learning today.