IF EMPTY(this.Parent.cboForm.Value) OR !USED('vcx') RETURN .f. ENDIF LOCAL nBegPos,nEndPos,lErr,cPathAndStem cPathAndStem= JUSTPATH(this.Parent.txtscx.Value) + JUSTSTEM(this.Parent.txtscx.Value) SELECT vcx LOCATE FOR TRIM(baseclass)=='form' AND TRIM(objname)==this.Parent.cboForm.Value IF NOT FOUND() MESSAGEBOX('error while locate the class',48,'') RETURN .f. ENDIF SKIP -1 nBegPos=RECNO() SKIP LOCATE FOR TRIM(platform)=='COMMENT' REST IF NOT FOUND() MESSAGEBOX('error while search the end postion of class',48,'') RETURN .f. ENDIF nEndPos=RECNO() *---------------------- TRY SELECT *; FROM vcx; WHERE RECNO()>=nBegPos AND RECNO()<=nEndPos; INTO TABLE (cPathAndStem) CATCH lErr=.t. ENDTRY IF lErr MESSAGEBOX('error while saving form ',48,'') RETURN .f. ENDIF *----------------------------- USE IN vcx CURSORSETPROP("Buffering" ,1) REPLACE uniqueid WITH 'Screen',; reserved1 WITH 'VERSION = 3.00' USE cPathAndStem= JUSTPATH(this.Parent.txtscx.Value) + JUSTSTEM(this.Parent.txtscx.Value) TRY ERASE (cPathAndStem+'.scx') ERASE (cPathAndStem+'.sct') CATCH lErr=.t. ENDTRY IF lErr MESSAGEBOX('error while overwriting existed form ',48,'') RETURN .f. ENDIF RENAME (cPathAndStem+'.dbf') TO (cPathAndStem+'.scx') RENAME (cPathAndStem+'.fpt') TO (cPathAndStem+'.sct') IF MESSAGEBOX('convert finished. do u want to open it?',4+32 ,'')=7 &&NO RETURN .T. ENDIF *--- MODIFY FORM (cPathAndStem) NOWAIT