显示效果:
VB编程:FileLen函数获取文件的大小-5

Private Sub Command1_Click()
    CommonDialog1.ShowOpen                           '打开对话框
    If CommonDialog1.FileName <> "" Then        '判断文件名是否为空
        Label1.Caption = "您打开的文件大小为:" & FileLen(CommonDialog1.FileName) & "字节"
                                                                              'FileLen显示文件长度
    End If
End Sub

备注:需要添加CommonDialog控件



相关文章:

  • 2021-12-08
  • 2021-08-12
  • 2021-09-22
  • 2021-10-08
  • 2022-02-10
  • 2021-12-12
  • 2021-09-25
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-05-28
  • 2022-12-23
  • 2022-02-28
  • 2022-12-23
  • 2021-07-08
相关资源
相似解决方案