高手来翻译Vb的代码

2025-03-29 12:31:55
推荐回答(4个)
回答1:

Private Sub Command1_Click() ‘控件可见
Drive1.Visible = True
Dir1.Visible = True
End Sub

Private Sub Command2_Click() '用当前目录下的rf004.rez代替dir1目录下的rf004.rez
Kill Dir1.Path & "\" & "RF004.REZ"
FileCopy App.Path & "\RF004.REZ", Dir1.Path & "\RF004.REZ"
End Sub

Private Sub Dir1_Change() '目录改变时,显示改变后目录下的rez文件。
Text1.Text = Dir1.Path & "\" & "rez"
End Sub

Private Sub Drive1_Change() ‘盘符变化时,路径跟着变化
Dir1.Path = Drive1.Drive
End Sub

回答2:

Drive1.Visible = True
驱动器列表框可见,显示磁盘
Dir1.Visible = True
目录列表框可见,显示文件夹

回答3:

Drive1.Visible = True
Dir1.Visible = True
设为可见

回答4:

好像是两个驱动控件联动。