VB显示文件

来源:百度知道 编辑:UC知道 时间:2024/05/13 10:18:12
在窗体上可以显示某个文件夹里的内容,就像windows的资源管理器一样,而且可以点击右键对文件执行操作,复制,删除,重命名等,希望高手可以帮忙解决0..........
先说声谢谢了....

因为有菜单,不好说,直接把代码给你吧。保存以下代码为.FRM文件。有右键菜单。
====================
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 3195
ClientLeft = 165
ClientTop = 450
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command1
Caption = "Command1"
Height = 375
Left = 2040
TabIndex = 3
Top = 120
Width = 1335
End
Begin VB.FileListBox File1
Height = 1890
Left = 2280
ReadOnly = 0 'False
TabIndex = 2
Top = 480
Width = 1935
End