I have just started working on c#, and was fiddling with some code sample that I got from some forum.
This code is using a namespace using system.windows.forms
using system.windows.forms
You may encounter this problem if you have multiple projects inside a solution and one of them is physically located inside solution folder. I solved this by right click on this folder inside Solution tree -> then pressing "exclude from project"