⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 clscd.cls

📁 一个简单易用的串口调试工具.全api完成.
💻 CLS
字号:
VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "clsCommDlg"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Attribute VB_Description = "Common Dialog class"
Attribute VB_Ext_KEY = "SavedWithClassBuilder6" ,"Yes"
Attribute VB_Ext_KEY = "Top_Level" ,"Yes"
Option Explicit

Private mvarAction As Integer
Private mvarCancelError As Boolean
Private mvarDefaultExt As String
Private mvarDialogTitle As String
Private mvarFileName As String
Private mvarFileTitle As String
Private mvarFilter As String
Private mvarFilterIndex As Integer
Private mvarFlags As Long
Private mvarHelpCommand As Integer
Private mvarHelpContext As Long
Private mvarHelpFile As String
Private mvarHelpKey As String
Private mvarInitDir As String
Private mvarMaxFileSize As Integer
Private mvarStyle As COMMON_DIALOG_STYLE
Public Enum enumFILTER
    TXT = 1
    XLS = 2
    All = 4
End Enum
Private mvarFilter2 As enumFILTER

Public Property Let Filter2(ByVal vData As enumFILTER)
Dim s As String
      If vData And TXT Then
        s = s & Chr(0) & "文本文件 (*.txt)" & Chr(0) & "*.txt"
      End If
      If vData And XLS Then
        s = s & Chr(0) & "EXCEL 表格 (*.xls)" & Chr(0) & "*.xls"
      End If
      If vData And All Then
        s = s & Chr(0) & "全部文件 (*.*)" & Chr(0) & "*.*"
      End If
     If s = "" Then
      s = s & Chr(0) & "全部文件 (*.*)" & Chr(0) & "*.*"
    End If
    mvarFilter2 = vData
     mvarFilter = Mid$(s, 2)
    
End Property
Public Property Get Filter2() As enumFILTER
    Filter2 = mvarFilter2
End Property
Public Property Let Style(ByVal vData As COMMON_DIALOG_STYLE)
Attribute Style.VB_Description = "Imposta lo stile di personalizzazione della finestra."
    mvarStyle = vData
    giCommonDialogStyle = vData
End Property
Public Property Get Style() As COMMON_DIALOG_STYLE
    Style = mvarStyle
End Property
Public Function ShowOpen(myForm As Form) As String
Attribute ShowOpen.VB_Description = "Visualizza la finestra di dialogo Apri."
Dim FError As Long
      Flags = OFN_EXPLORER Or _
            OFN_HIDEREADONLY Or _
            OFN_LONGNAMES Or _
            OFN_PATHMUSTEXIST Or _
            OFN_ENABLEHOOK Or _
            OFN_FILEMUSTEXIST
  ShowOpen = pFileOpen(myForm, FError&, mvarFilter, mvarInitDir, mvarDialogTitle, mvarFilterIndex, mvarFlags)
End Function
Public Property Let MaxFileSize(ByVal vData As Integer)
Attribute MaxFileSize.VB_Description = "Restituisce o imposta la dimensione massima dei nomi dei file che ?possibile aprire."
    mvarMaxFileSize = vData
End Property
Public Property Get MaxFileSize() As Integer
    MaxFileSize = mvarMaxFileSize
End Property
Public Property Let InitDir(ByVal vData As String)
Attribute InitDir.VB_Description = "Restituisce o imposta la directory iniziale per i file."

    mvarInitDir = vData
End Property
Public Property Get InitDir() As String
    InitDir = mvarInitDir
End Property
Public Property Let HelpKey(ByVal vData As String)
Attribute HelpKey.VB_Description = "Restituisce o imposta la parola chiave che identifica l'argomento della Guida richiesto."
    mvarHelpKey = vData
End Property
Public Property Get HelpKey() As String
    HelpKey = mvarHelpKey
End Property
Public Property Let Flags(ByVal vData As Long)
Attribute Flags.VB_Description = "Restituisce o imposta le opzioni relative alle finestre di dialogo Apri e Salva con nome."
    mvarFlags = vData
End Property
Public Property Get Flags() As Long
    Flags = mvarFlags
End Property
Public Property Let FilterIndex(ByVal vData As Integer)
Attribute FilterIndex.VB_Description = "Restituisce o imposta un filtro predefinito per una finestra di dialogo Apri o Salva con nome."
    mvarFilterIndex = vData
End Property
Public Property Get FilterIndex() As Integer
    FilterIndex = mvarFilterIndex
End Property
Public Property Let Filter(ByVal vData As String)
Attribute Filter.VB_Description = "Restituisce o imposta i filtri visualizzati nellacasella di riepilogo Tipo file di una finestra di dialogo."
    mvarFilter = vData
End Property
Public Property Get Filter() As String
    Filter = mvarFilter
End Property
Public Property Let FileTitle(ByVal vData As String)
Attribute FileTitle.VB_Description = "Restituisce il nome (ma non il percorso) del file da aprire o salvare."
    mvarFileTitle = vData
End Property
Public Property Get FileTitle() As String
    FileTitle = mvarFileTitle
End Property
Public Property Let FileName(ByVal vData As String)
Attribute FileName.VB_Description = "Restituisce o imposta il percorso e il nome di un file selezionato."
    mvarFileName = vData
End Property
Public Property Get FileName() As String
    FileName = mvarFileName
End Property
Public Property Let DialogTitle(ByVal vData As String)
Attribute DialogTitle.VB_Description = "Restituisce o imposta la stringa visualizzata nellabarra del titolo della finestra di dialogo."
    mvarDialogTitle = vData
End Property
Public Property Get DialogTitle() As String
    DialogTitle = mvarDialogTitle
End Property

Public Property Let DefaultExt(ByVal vData As String)
Attribute DefaultExt.VB_Description = "Restituisce o imposta l'estensione predefinita per i nomi di file visualizzati nella finestra di dialogo."
    mvarDefaultExt = vData
End Property
Public Property Get DefaultExt() As String
    DefaultExt = mvarDefaultExt
End Property
Public Property Let CancelError(ByVal vData As Boolean)
Attribute CancelError.VB_Description = "Restituisce o imposta un valore che indica se la scelta del pulsante Annulla da parte dell'utente genera o meno un errore."
    mvarCancelError = vData
End Property
Public Property Get CancelError() As Boolean
    CancelError = mvarCancelError
End Property
Public Property Let Action(ByVal vData As Integer)
Attribute Action.VB_Description = "Restituisce o imposta il tipo di finestra di dialogo da visualizzare."
    mvarAction = vData
End Property
Public Property Get Action() As Integer
    Action = mvarAction
End Property

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -