Posted: Tue Aug 26, 2003 9:55 am Post subject: Problems with MainMenu when using Smartphone 2003 SDK &
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
Joined: 30 Jun 2003
Posts: 514
Location: Redmond, WA
Posted: Tue Aug 26, 2003 10:16 am Post subject:
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.
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.
_________________
"I have no special talents, I am only passionately curious" - Albert Einstein
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