> > >
"This looks like a very good idea for new projects..."> > >
> > > George,
> > >
> > > When you have the sizer that you want, why not retrofit your old forms. Create your new form class (inlcuding the sizer) and then open your form as a table and change the form's classlib and class name:
> > >
> > > USE [Path2\MyForm.SCX] IN 0 EXCL ALIAS MyForm
> > > SELECT MyForm
> > > LOCATE FOR BaseClass = [Form]
> > > REPLACE Class WITH [MySizerFormClassName], ;
> > > ClassLoc WITH [FulPath2\MyBaseClassLib.VCX]
> > > USE IN SELECT([MyForm])
> > >
> > >
> > > With VFP, just about everything is a table. Using ADIR() you could write a little program that looped through all of the forms in you Forms directory and change the class and classlib to your new new sizerform class.
> > >
> > >
> > > Ken
> > > You shall know the truth - and the truth shall set you free. (John 8:33)
> >
> > This is real good for application wide changes Ken!
> > Question:
> > Is it OK to insert "records" e.g. Command buttons
> > If yes, What are the rules for assigning values for UniqueID and timestamp.
> >
> > George
>
> George,
>
> To tell you the truth, I have never even attempted inserting a record for a command button. I suppose you could as this is just another table. I normally only hack a form when this is the only way to do something. If I want to add a command button, I do it visually.
>
> Ken
> You shall know the truth - and the truth shall set you free. (John 8:33)
I've done a few tests
Appending a record( button) puts the record at the END of the table, AFTER the COMMENT record.
To open visually, it appears that the last record in the table must be the COMMENT record.
First attempt made the form un-usable visually, so VERY dangerous.
This technique worked though:
Used INSERT command to add my new button record
Located the the COMMENT record and did a "scatter memvar memo"
Then deleted it
Then: insert into myform from memvar
Then: PACK
The idea was to get the COMMENT record to be the last record.
However, I'm not at all confident enough to use this on my live forms.
Particularly, the other problem remains: What values to assign to UniqueID and Timestamp in records manually added??
I'm playing with "less adventurous" exercises:
searching and replacing code in methods
inserting code into methods
Its going good
Thanks for the pointer to get going on this Ken
George