r/visualbasic • VB.Net Intermediate • Jul 20 '17

VB.NET Help Moving the Form while a Process is still running?

Hi there. So I am trying to make a Youtube-DL GUI, and am a bit stumped.

Here is the code I used.

Here, meanwhile, is the form design.

Here are my checklists, and if you guy could help me out, I owe you a big virtual hug/high-5!

  • I cannot move the form while the youtube-dl process is still running.

  • In CMD/batch, the youtube-dl's percentage is updated on a single line, while I cannot do so & have to make a new line for each percentage.

  • In connection with list 1, I cannot click anything while the process is still running.

  • BONUS: displaying percentage of each video's progress in progress bar. If list 2 is achieved, this one should be alright.

Thanks in advance!

5 Upvotes

2 comments sorted by

3

u/ilovebasic Jul 20 '17

https://msdn.microsoft.com/en-us/library/system.componentmodel.backgroundworker(v=vs.110).aspx

You should try background-worker, It's make your process working in the shadow without making your GUI look "Unresponsive"..

2

u/J-Debstup VB.Net Intermediate Jul 20 '17

Thanks for the reply! However, I'm not quite sure how to set the backgroundWorker to work with the process...

  1. I have Process.Filename = [youtubedl executable]

  2. I set backgroundRun as new backgroundWorker.

What should I do next?