What do you mean you noticed this behaviour when using the msgbox function? Can you show us the code you are talking about? We can't help you find what is still running without seeing your code. Also, does your project have just one form? Or several?
Click on My Project in the solution explorer and click on the Application tab, what do you have set for Shutdown mode? If you have "When startup form closes" and you have multiple forms, the problem could be that you haven't actually closed the startup form of your project. If you have "When last form closes" then perhaps you have hidden a form but not closed it entirely and that's why it's still running.
If changing those settings and/or making sure that all forms are closed doesn't work, you could always use
Application.Exit()[
^]
to get the entire application to shutdown.