• 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

  • 相关阅读:
    HDU3584 Cube
    SPOJ1029 Matrix Summation
    SPOJ227 Ordering the Soldiers
    ScriptX,smsx打印控件安装及无法打印的问题
    如何做站
    右下角浮动
    简单的显示关闭
    总结
    ubuntu 上网设置
    固定高度后能自动伸缩
  • 原文地址:https://www.cnblogs.com/wgscd/p/5773400.html
Copyright © 2020-2023  润新知