zoukankan      html  css  js  c++  java
  • VB6 Common Dialog

    '----------------------------
    'Class CommonDialog
    'Member of MSComDlg
    '----------------------------

    Private Sub Command1_Click()
    ShowOpenFile
    End Sub

    Private Sub ShowOpenFile()

    Dim gLastClDir As String, FilePath As String, TempDir As String
    gLastClDir = App.Path  '"C:wgscd"
    On Error GoTo ErrHandler
    With cdlOpendb
        .CancelError = True
        .FileName = ""
        .InitDir = gLastClDir
        .DefaultExt = ".cl2"
        .DialogTitle = "Open File for Import"
        .Filter = "COMMLINK Files (*.cl2)|*.cl2"
        .FilterIndex = 1
        '.Flags = cdlOFNPathMustExist + cdlOFNHideReadOnly + cdlOFNExtensionDifferent + cdlOFNFileMustExist
        .Flags = cdlOFNHideReadOnly + cdlOFNOverwritePrompt + cdlOFNCreatePrompt
        .ShowOpen
    End With
    
    FilePath = cdlOpendb.FileName
    MsgBox FilePath
    

    ' On Error Resume Next
    ' TempDir = Left(FilePath, InStr(FilePath, ".")) & " em33"
    ' MkDir TempDir
    'Kill TempDir & "*.*"
    ExitOut:
    ErrHandler:
    'User pressed the Cancel button from the Open Dialog
    End Sub

  • 相关阅读:
    redis
    魔法方法
    vue
    bbs技术总结
    Linux
    爬虫
    路飞项目
    Django-rest framework框架
    Django框架
    WEB
  • 原文地址:https://www.cnblogs.com/wgscd/p/5773400.html
Copyright © 2011-2022 走看看