SharpDevelop Community

Get your problems solved!
Welcome to SharpDevelop Community Sign in | Join | Help
in Search

Failed to load designer

Last post 01-04-2009 2:43 PM by smokiejim. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 03-05-2007 2:19 PM

    • rcman80
    • Not Ranked
    • Joined on 03-05-2007
    • United States, California
    • Posts 4

    Failed to load designer

    When I open a project originally created in Visual Basic 2005 Express with SharpDevelop 2.1.0.2376 and attempt to view a form in Design view, I get the following error:

     Failed to load designer. Check the source code for syntax errors and check all references are available.

    Syntax errors in Form1.vb:
    -- line 8 col 121: invalid EventMemberSpecifier

    The line in question is the following with everything from column 121 and on underlined.

       Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing

    If I rename 'Me' to Form1, Design view shows, but SharpDevelop generates errors (as it would in VB) that I need to use 'Me' instead of Form1.

     
    Thank you for your time.
     

  • 03-08-2007 10:00 AM In reply to

    • rcman80
    • Not Ranked
    • Joined on 03-05-2007
    • United States, California
    • Posts 4

    Re: Failed to load designer

    After days of poking around the forum and the net here is what I found:

    1. I found a lot of references on the forum regarding AddHandler.

    (Note: It appears to me, although I could be wrong, it is not so much the Handles keyword that is causing the issue, but the Me keyword.  In my original post, I state #D refers to an error at col 121 and if I rename Me to Form1, the Design View shows.)

    2. I Googled AddHandler and found the following:

    http://www.functionx.com/vbnet/Lesson05.htm

    I added this to my code:

    Inherits System.Windows.Forms.Form

    #Region "Windows Form Designer Generated Code"

    Public Sub New()

    MyBase.New()

     

    'This call is required by the Windows Form Designer.

    InitializeComponent()

    AddHandler Me.Closing, AddressOf Form1_FormClosing

    AddHandler Me.Load, AddressOf Form1_Load

    AddHandler Me.Resize, Addressof Form1_Resize

    End Sub

    #End Region

    and modified the sub as follows:

    Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) 'Handles Me.FormClosing

    The only error I get now is "Invalid value for 'AssemblyVersion'.(MSB3174)"; guess its back to the forum and net.

  • 03-08-2007 10:39 AM In reply to

    • rcman80
    • Not Ranked
    • Joined on 03-05-2007
    • United States, California
    • Posts 4

    Re: Failed to load designer

    O.K., after a quick Google, I found this on our Forum:

    http://community.sharpdevelop.net/forums/thread/11449.aspx

    For Visual Basic you'll open your *.vbproj file ( * refers to the name of your VB project).  The post states to find the 'AssemblyVersion' node; I had to correct the 'ApplicationVersion' node. (WARNING: Do not use a word processor to edit the file (I used PSPad which is a good text editor and free).

  • 04-01-2007 2:31 PM In reply to

    Re: Failed to load designer

    Thanks, it woked for me as well,

    I had to remove the handler on the main form load events too.

    Private Sub FMain_Load(ByVal sender As Object, ByVal e As System.EventArgs)  ' Handles Me.Load

    Paolo

  • 01-04-2009 2:43 PM In reply to

    Re: Failed to load designer

    I don't know if it's the right place to write... but, is there a way to use "Handles Me.xxx" in sharpdevelop?? If not, iis it a bug that will be fixed? if it isn't a bug, will it implemented in future versions (perhaps 3.1) thank you, sorry for my english :(
Page 1 of 1 (5 items)
Powered by Community Server (Commercial Edition), by Telligent Systems
Don't contact us via this (fleischfalle@alphasierrapapa.com) email address.