Are you developing a windows application or web application? @timmyjoshua
I am asking that because, I also used the similiar code as @ss125 posted in the above post. Its used for the web application. If you want a windows application code, you have to mention that in your question itself.