我正在获取文件夹名称,并在同一目录中获取 pdf 文件,并使用以下代码在同一个列表框中列出两者:
Private Sub frmBooks_Load(sender As Object, e As EventArgs) Handles MyBase.Load
For Each folder As String In System.IO.Directory.GetDirectories(Application.StartupPath & "\Books")
ListBox1.Items.Add(Path.GetFileName(folder))
Next
For Each file As String In System.IO.Directory.GetFiles(Application.StartupPath & "\Books\", "*.pdf")
ListBox1.Items.Add(Path.GetFileNameWithoutExtension(file))
Next
两者都在同一个列表框中混合和排序1 然后我添加 axacropdf(PDF 组件)来阅读 pdf 文件。如何从列表框中的选定项目打开/获取路径以在 axacropdf 中打开?
(axacropdf.src =)