vb.net - prevent msgbox flood

hello there,
I have a little app that checks file but for some reason if a file is being used it shows a little msgbox saying file in use.. I leave this app running and when I come back I usually find about 30 little windows of msgbox.
is there anything that can close the last msgbox before making a new one to prevent flood?
LVL 1
XK8ERAsked:
Who is Participating?
 
PakaConnect With a Mentor Commented:
This should get you there...
http://vbcity.com/forums/t/105842.aspx
0
 
PakaConnect With a Mentor Commented:
Another method would be to create a global variable that you set when the msgbox is opened and cleared when you close it.  If the variable is set, then either don't open a new window, or close the msgbox (using the code above) and create a new one.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.