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

  • 相关阅读:
    孙权劝学
    劝学
    为学
    字符串的全排列
    剑指offer面试题3二维数组中的查找
    如何正确安装软件
    写给自己的话
    Linux常用命令
    第三届华为杯
    D^3ctf两道 pwn
  • 原文地址:https://www.cnblogs.com/wgscd/p/5773400.html
Copyright © 2011-2022 走看看