Dec 11, 2016 02:37 PM
(This post was last modified: Dec 11, 2016 02:39 PM by selfieman231.)
Hello hf members, today I need some help using timers in vb.net. How will I go if I want something to run in a specific part of my code ?
Let me explain my self a little:
I'm running this function and than closing my program right away, but since vb.net is super fast the program does not have time to delete the file and still closes leaving the file untouched. I would like to set a time for that specific code to run than continue the application and close it. Pretty much pausing the program until the file gets deleted.
How would I go into doing that?
Let me explain my self a little:
Code
Public Function Delete()
If System.IO.File.Exists(Globals.Location) = True Then
System.IO.File.Delete(Globals.Location)
End If
End FunctionI'm running this function and than closing my program right away, but since vb.net is super fast the program does not have time to delete the file and still closes leaving the file untouched. I would like to set a time for that specific code to run than continue the application and close it. Pretty much pausing the program until the file gets deleted.
How would I go into doing that?



