Results 1 to 10 of 10

Thread: method not supported when initializing form?

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    method not supported when initializing form?

    Hi.

    Wierd errors are happening.

    I was able to run my application fine. the next time I ran it without any modification to the code, I always got exceptions when the application was initialising its own form methods and components (like setting the default text of the form or creating the onlLoad event handler of the form).

    I always got "methodnotsupported exception"

    What is this and why is it happening? I have even repaired VS.NET 2003 and rebooted the computer. Same result.

    If I start a new project, its fine! But I know it will happen again whenever it wants to

    any ideas?

  2. #2
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: method not supported when initializing form?

    Where's Uri Geller when you need him?

    He's good at reading minds, where as we mere mortals are not. Please show us some code. And tell us which line the error occurs on.

    I don't live here any more.

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    Re: method not supported when initializing form?

    hehe

    the code is when it is initialising its own form components such as:

    this.Form1.Text += "Form1";

  4. #4
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    Re: method not supported when initializing form?

    never happened to me
    Can you paste the exact error message?
    and are you doing anything you shouldnt be doing? (ie, rearranging/modifying the design code yourself or anything like that?)
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  5. #5

    Thread Starter
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    Re: method not supported when initializing form?

    nope not at all

    and that is the exact error message "method not supported exception"

    wierd thing is, if i start a new project and copy and paste methods (not the entire code) and stuff, it works fine...

  6. #6

    Thread Starter
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    Re: method not supported when initializing form?

    and its done it AGAIN on a new project:


    n unhandled exception of type 'System.NotSupportedException' occurred in System.Windows.Forms.dll

    Additional information: NotSupportedException


    this.Text = "Form1"


    Now, I have just done a test and it seems to be related to this:

    if I add a menu and add submenus... as soon as i had a submenu this error happens, however if i just add a main menu, there is no error.

    any ideas?! This is wierd, it should not be doing this
    Last edited by Techno; Jul 27th, 2005 at 03:59 PM.

  7. #7
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    Re: method not supported when initializing form?

    very odd
    umm this might sound stupid, but seriously post this in the vb.net forum instead it could apply to VB also, and there you'd get a lot of more people watching your thread. maybe someone would know better there
    I googled it and found this
    http://www.modaco.com/index.php?showtopic=101742

    edit:nvm the link, its for the compact framework
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  8. #8

    Thread Starter
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    Re: method not supported when initializing form?

    I just found the solution

    This was for mobile development (the app I am making) and apperently in order to create sub/pop up menus you have to assign that menu system to the RIGHT softkey not left

    sorted

  9. #9
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    Re: method not supported when initializing form?

    ah you should have mentioned that in the begining hehe
    that post I showed apparently had that in it too
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  10. #10

    Thread Starter
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    Re: method not supported when initializing form?

    indeed it did thanks very much Mr.Polite

Posting Permissions

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



Click Here to Expand Forum to Full Width