Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Change the property of form
Message
 
 
To
01/07/2001 02:50:36
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00525665
Message ID:
00525683
Views:
12
Santosh,

You can set the caption on the property sheet, it doesn't have to be done in code in the Init. If you have not defined all of your forms from your own common Form subclass then you are still left with the task of redefining all of your forms from a new subclass that you are creating. You can automate the process by simply USE each form as a table and then modify the contents of two columns of one of the rows:

MAKE SURE YOU BACKUP EVERYTHING BEFORE YOU DO THIS!!!!!!!

create classlib MyClassLib
create class MyNewFormSubClass of MyClassLib as form
* set the caption
* close the class designer
use TheForm.scx
locate for baseclass = "form" and empty( class ) and empty( classloc )
if ( found() )
replace class with "mynewformsubclass", classloc with "myclassLib.vcx"
endif

You'll also have to make sure each form has not overridden the Caption, you can search for a line in the Properties memo and remove it in the code above.

Test the code on one sample form first to make sure you've got everything right. If you mess up VFP will not be able to open the form in the designer again until you have corrected any possible damage. You can use ADIR() to create an array of forms and simply iterate through all of them programatically.

One other note - are you positive you want to give ALL of your forms the same caption? It's going to make it much harder for your users to figure out which form is which while your app is running.


>i have created 62 forms for one of my project.Now what problem do i have is that i want to change the caption of all forms. I can do it by modiying all forms and change the caption to particular which is "christeen software"
>but what i want is that i should do it to the baseclass of myform so that it will be less working and it will save my time. Even I want to add a property to all my forms which will be faster throught baseclass. please help how can i change the caption of form at one place so that it will be seen all over forms.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform