'Form1' is a type in 'WindowsApplication5' and cannot be used as an expression

Valerie.net

New member
Joined
Jan 9, 2010
Messages
2
Programming Experience
Beginner
Hello, I'm a newbie on this forum and since september last year to visual studio.

This might be a silly question, but it's keeping me from making my exercises for school.

I have made an ellipse with a trackbar etc and when I trie to debug i get this error:
Error 1 'Form1' is a type in 'WindowsApplication5' and cannot be used as an expression. C:\Oefeningen VB.NET\WindowsApplication5\WindowsApplication5\My Project\Application.Designer.vb 35 27 WindowsApplication5

The code i have typed is the same as in my book. So that can't be the fault.
But, when I click on the code this is selected:
Me.MainForm = Global.WindowsApplication5.Form1

I somebody could help me, it would be super.

Thank you already!
 
hi, thanks alot, you solved my problem

Hey,

I found the answer myself.
I did: private sub new()
....
end sub

but it had to be public sub new()

But thanks anyway!


Thanks my dear, you solved my problem which i am facing more than three days. thanks alot
 
Back
Top