>I have a main.prg that has the following code:
>*!* open database employee
>on shutdown do myshutdown
>_screen.windowstate=2
>do form renamefile
>read event
>on shutdown
>
>I have myshutdown.prg that contains the following code:
>&& myshutdown
>clos all
>clea all
>capslock(.f.)
>clear events
>quit
>
>In my form (renamefile) init I am just renaming a file then trying to exit the program:
>with thisform
>local f,t,continue_on,sour,dest
>continue_on = .t.
>adir(a__gen2,'d:\test\qlblsrc.fr*')
>if type('a__gen2') # 'U' and type('a__gen2') # 'L'
> sour=a__gen2(1,1)
> conv=stuff(sour,1,8,'')
> conv=alltrim(conv)+'.txt'
> dest='d:\test\'+conv
> sour = 'd:\test\'+sour
> rename (sour) to (dest)
>endif
>endwith
>thisform.release()
>clear event
>return(.t.)
>
>
>When I run this program in .exe the form renamefile doesn't seem disappear. I need a way to run my code without user intervention. I am doing this right. Can we just run prg file like a batch file? If so how do exit the program without user intervention.
>
>Thanks
>Help appreciated
Use RETURN .F. instead of Thisform.Release() so that it will not continue to instantiate.
Why don't you try to add object class in your _screen object to do what you ought to do instead of using a form.
JESS S. BANAGA
Project Leader - SDD division
...shifting from VFP to C#.Net
CHARISMA simply means: "Be more concerned about making others feel good about themselves than you are in making them feel good about you."