簡體   English   中英

VB.NET根據目錄中的文件生成標簽

[英]VB.NET Generating labels based on files from a directory

我需要根據目錄的文件名生成一些標簽。請幫助

U可以在vb中使用此cmd命令生成包含文件夾的所有文件名的文本文件

   Process.Start("cmd", "/c c: & cd\ & cd windows & dir > filename.txt")

然后做你想做的事情

添加標簽

  Public sub Form_load
  Textbox1.text(File.ReadAllLines(txt file location that was createdd earlier))

  'add a flow layout panel
   For each line in txtbox1.Lines
   dim lbl as new label
   Flpanel1.controls.add(lbl)
   using i as integer
   lbl.text=txtbox1.lines(i)  
   next

這未經測試...讓我知道它是否有效

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM