小编Koy*_*tky的帖子

检测 CommonDialog 控件中的取消按钮

在 VB6 中,如果我按下对话框Cancel上的Open File按钮,我的文件名仍会添加到我的列表框中。

例如:

Private Sub btnImportImage_Click()
    DailogOpenFile.ShowOpen
    If Trim$(txtEmailAttachment.Text) = "" Then
        txtEmailAttachment.Text = DailogOpenFile.FileName
    Else
        txtEmailAttachment.Text = txtEmailAttachment.Text & ";" & DailogOpenFile.FileName
    End If

End Sub
Run Code Online (Sandbox Code Playgroud)

vb6

5
推荐指数
1
解决办法
7642
查看次数

标签 统计

vb6 ×1