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?
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.
:rolleyes:
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";
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?:D (ie, rearranging/modifying the design code yourself or anything like that?)
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...
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
Re: method not supported when initializing form?
very odd:D
umm this might sound stupid, but seriously post this in the vb.net forum instead:D 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::Dnvm the link, its for the compact framework
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 :)
Re: method not supported when initializing form?
ah you should have mentioned that in the begining hehe:D
that post I showed apparently had that in it too;)
Re: method not supported when initializing form?
indeed it did :) thanks very much Mr.Polite :D