DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   VB.NET (http://www.daniweb.com/forums/forum58.html)
-   -   vb.net error (http://www.daniweb.com/forums/thread166252.html)

daniel50096230 Jan 5th, 2009 10:07 am
vb.net error
 
Hi, I have the following codes:

me.hide()
staff.show()

It run smoothly for the first time,but when I execute it for the second time,it occured the following errors:

Unable to copy file "obj\Debug\FYP.exe" to "bin\Debug\FYP.exe". The process cannot access the file 'bin\Debug\FYP.exe' because it is being used by another process.


May I know what is the problem???

Ramy Mahrous Jan 5th, 2009 1:59 pm
Re: vb.net error
 
Because the main thread doesn't terminated. You just hide the main form, I think you close application from staff form, right?
so, in its close event add this
Application.Exit

hatemstar Jan 5th, 2009 2:15 pm
Re: vb.net error
 
I Prefer to Put ( .close() ) instead of ( .hide )

me.close()

then see the result ..


All times are GMT -4. The time now is 4:07 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC