Home > database >  Did a program to change the computer can't open it unless it is f dish
Did a program to change the computer can't open it unless it is f dish

Time:09-26

I am a beginner VFP, code and path into an absolute path, f plate can also be used, if on the other plate has been revealed to find what what, I also don't know how to change the relative path, want to consult everybody a great god is there any way to resolved this problem!

CodePudding user response:

At the beginning of your main program set the default path:

* method one:
* * * * * * * * * * * * * * * * * * * * * *
Public gcNowPath
GcNowPath=Addbs (Justpath (Sys (16))) & amp; & Gets the current in the working directory of the program,
Set the Default To (gcNowPath)
* * * * * * * * * * * * * * * * * * * * * *

* method 2:
* * * * * * * * * * * * * * * * * * * * * *
Public gcNowPath
GcNowPath=Addbs (Sys (5) + Sys (2003))
Set the Default To (gcNowPath)
* * * * * * * * * * * * * * * * * * * * * *

You all code using the absolute path to remove the path

CodePudding user response:

To change to get rid of all the absolute path

CodePudding user response:

Learning, also found the Sys () command, feel good VFP complex, all have no common with other languages,

CodePudding user response:

With relative path, I also learn a year VFP, feeling very simple, maybe it's my function is simple to implement

CodePudding user response:

In fact you as long as the main program, or it is ok to set a default location inside the form,
Set into a program's current position to the default location, no matter where you can,
Wz=Sys (5) + Sys (2003)
Set the default to (wz)
  •  Tags:  
  • VFP
  • Related