 |
VFP 愛用者社區 本討論區為 Visual Foxpro 愛用者經驗交流的地方, 請多多利用"搜尋"的功能, 先查看看有無前例可循, 如果還有不懂的再發問. 部份主題有附加檔案, 須先註冊成為社區居民才可以下載.
|
| 上一篇主題 :: 下一篇主題 |
| 發表人 |
內容 |
ckp6250
註冊時間: 2004-07-30 文章: 1645
第 31 樓
|
發表於: 星期五 五月 21, 2010 5:25 pm 文章主題: |
|
|
chgc 您好
關貿的問題,主要是它的資料檔擺放位置問題
在 win 98 , win xp , win 7 , 位置都不一樣
所以,我的處理方式是,必需去偵測 win 的版本,
然後,在程式中對應到該位置
舉一點我的例子
_SpecialFolders=SpecialFolders("AllUsersDocuments")
vOS = SUBSTR(OS(),9,1) && Win 版本
If Empty(_SpecialFolders)
Do Case
Case vOs="4" && Win98
_SpecialFolders = "C:\Documents\"
Case vOs="5" && Win XP
_SpecialFolders = "C:\Documents and Settings\All Users\Documents\"
Case vOs="6" && Win 7
_SpecialFolders = "C:\Users\Public\Documents"
Endcase
Endif
If vOs $ "4,5,6"
chkFile = Addbs(_SpecialFolders)+"etax\blr\DB\Code\BLRDB1_Applyer.DB"
Else
chkFile = GetShortName(Addbs(_SpecialFolders)+"etax\blr\DB\Code\BLRDB1_Applyer.DB")
Endif
If ! File(chkFile)
Messagebox("找不到"+Chr(13)+chkFile,16,"請重新安裝財政部審核程式")
Return .F.
Endif
If vOs $ "5,6"
vCodePath = Addbs(GetShortName(Justpath(chkFile)))
Else
vCodePath = Addbs(Justpath(chkFile))
Endif |
|
| 回頂端 |
|
 |
|
|
您 無法 在這個版面發表文章 您 無法 在這個版面回覆文章 您 無法 在這個版面編輯文章 您 無法 在這個版面刪除文章 您 無法 在這個版面進行投票 您 無法 在這個版面附加檔案 您 無法 在這個版面下載檔案
|
|