VB编程:FileLen函数获取文件的大小-5_彭世瑜_新浪博客 彭世瑜 2022-03-30 126 阅读1分钟 显示效果: \ Private Sub Command1_Click() CommonDialog1.ShowOpen '打开对话框 If CommonDialog1.FileName <> "" Then '判断文件名是否为空 Label1.Caption = "您打开的文件大小为:" & FileLen(CommonDialog1.FileName) & "字节" 'FileLen显示文件长度 End If End Sub \ 备注:需要添加CommonDialog控件 \ \ \