+ Reply to Thread
Results 1 to 2 of 2

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

  1. #1
    Valerie.net is offline VB.NET Forum Newbie Valerie.net is on a distinguished programming path ahead
    .NET Framework
    .NET 3.5
    Join Date
    Jan 2010
    Age
    19
    Posts
    2
    Reputation
    0

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

    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!

  2. #2
    Valerie.net is offline VB.NET Forum Newbie Valerie.net is on a distinguished programming path ahead
    .NET Framework
    .NET 3.5
    Join Date
    Jan 2010
    Age
    19
    Posts
    2
    Reputation
    0

    Default

    Hey,

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

    but it had to be public sub new()

    But thanks anyway!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts