![]() |
|
論壇說明 |
歡迎您來到『史萊姆論壇』 ^___^ 您目前正以訪客的身份瀏覽本論壇,訪客所擁有的權限將受到限制,您可以瀏覽本論壇大部份的版區與文章,但您將無法參與任何討論或是使用私人訊息與其他會員交流。若您希望擁有完整的使用權限,請註冊成為我們的一份子,註冊的程序十分簡單、快速,而且最重要的是--註冊是完全免費的! 請點擊這裡:『註冊成為我們的一份子!』 |
|
主題工具 | 顯示模式 |
![]() |
#6 (permalink) |
註冊會員
|
![]() 附上某些電腦會發生錯誤的程式碼,在Form上只有引用CommonDialog及加上功能表,就連單獨包成一個Setup,能執行的能執行,原本不能執行的也不能執行,所以問題是出在這裡。引用API是沒問題的,因為我做了一個Form來跳出兩個Form,不管是否引用都會錯誤...比較了Setup.lst,該引用的都有進來....
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long Private Sub Form_Load() frmSplash.Show start = Timer Do While Timer < start + 1.5 DoEvents Loop Unload frmSplash mnuSetup.Enabled = False End Sub Private Sub frmCompact_Click() frmCompactDB.Show vbModal End Sub Private Sub mnuExport_Click() frmExport.Show vbModal End Sub Private Sub mnuOpen_Click() ' 顯示開啟檔案對話方塊 Dim Ftemp As String '暫存原檔名 dlgDialog.FileName = "" dlgDialog.Flags = FileOpenConstants.cdlOFNFileMustExist dlgDialog.DialogTitle = "開啟 Access 資料庫檔案" dlgDialog.Filter = "Access 97-2003 (*.mdb)|*.mdb|" dlgDialog.ShowOpen Ftemp = OpenFileName If Len(dlgDialog.FileName) > 0 Or OpenFileName <> Ftemp Then FinishNewName = False '是否進入MDBOUTSET之準則 Tn = 1 '重設自動產生輸出檔名計數器 TableName = "" OpenFileName = dlgDialog.FileName OpenFileType = dlgDialog.FilterIndex mnuSetup.Enabled = True End If End Sub Private Sub mnuAbout_Click() frmAbout.Show vbModal End Sub Private Sub mnuDelLog_Click() MsgBox "確定要刪除Log檔嗎?", vbOKCancel + vbQuestion, "刪除log檔" If rtn = vbOK Then Kill App.Path & "\Outputlog.log" End If End Sub Private Sub mnuEnd_Click() End End Sub Private Sub mnuHelpFile_Click() ShellExecute 0, "open", App.Path & "\Manual.pdf", "", App.Path, 1 End Sub Private Sub mnuLog_Click() If Dir(App.Path & "\outputlog.log") = "" Then MsgBox "請先完成分割後,系統自動產生記錄檔!", vbExclamation, "找不到Log檔案" Else ShellExecute 0, "open", App.Path & "\OutputLog.log", "", App.Path, 1 End If End Sub Private Sub mnuSaveAs_Click() frmConvert.Show vbModal End Sub Private Sub mnuSimple_Click() SavedCount = 0 Setup.Show End Sub Private Sub munCross_Click() frmCrossSetting.Show End Sub |
![]() |
送花文章: 0,
![]() |