FAQ Profile Memberlist Usergroups Register
Log in to check your private messagesLog in to check your private messages -> Log in  
Problems with MainMenu when using Smartphone 2003 SDK & VB.NET

 
Post new topic   Reply to topic    Smartphone Thoughts Forum Index -> Developer Printable version
View previous topic :: View next topic  
Author Message
Mike Temporale
Managing Editor


Joined: 07 Jul 2003
Posts: 9863
Location: Toronto, Canada

PostPosted: Tue Aug 26, 2003 9:55 am    Post subject: Problems with MainMenu when using Smartphone 2003 SDK & Reply with quote

Has anyone else played with the new Smartphone 2003 SDK using VB.NET??

For some reason I can't build a menu for the left hot key. I can for the right, but of the left key has any children, it will fail when deploying with the following error:

Quote:
An unhandled exception of type 'System.NotSupportedException' occurred in System.Windows.Forms.dll


It fails on the system generated line

Code:
me.Menu = Me.MainMenu1


Am I doing something wrong here? of is there an issue with the using the main menu on the left softkey?
_________________
"I have no special talents, I am only passionately curious" - Albert Einstein
Back to top
View user's profile Send private message Visit poster's website
Robert Levy
Smartphone Philosopher


Joined: 30 Jun 2003
Posts: 514
Location: Redmond, WA

PostPosted: Tue Aug 26, 2003 10:16 am    Post subject: Reply with quote

This is by design. Here's a snippet from the SDK's documentation.

"You can have no more than two top-level menu items.
Only the second top-level menu item, on the right side of the form, can have submenus.
Note The .NET Compact Framework does not enforce these restrictions at design time but does throw an NotSupportedException at run time.
Visual Studio.NET automatically adds a MainMenu component to your form when you create Smartphone and Pocket PC applications. The component, however, is not automatically added to child forms.

The Compact Framework does not limit the number of submenu items you can have or the number of nested menus, but for best practices follow Smartphone UI guidelines as described in "Designing User Interfaces for Smartphone" in the Smartphone Guide.

At run time, you cannot delete a top-level menu item. However, you can set MenuItem.Enabled to false and set MenuItem.Text to an empty string to make a menu item appear invisible."
_________________
This posting is provided "AS IS" with no warranties, and confers no rights.
Back to top
View user's profile Send private message
Mike Temporale
Managing Editor


Joined: 07 Jul 2003
Posts: 9863
Location: Toronto, Canada

PostPosted: Tue Aug 26, 2003 7:09 pm    Post subject: Reply with quote

Thanks! I looked in the SDK Help while I was at the cottage last week, however I'm guessing I had too many glasses of wine and that's why I couldn't find the answer. #Beer
_________________
"I have no special talents, I am only passionately curious" - Albert Einstein
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Smartphone Thoughts Forum Index -> Developer All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Copyright 2004 Jason Dunn | Web design & development by Fabrizio Fiandanese