PC Review


Reply
Thread Tools Rate Thread

Can't create menuitem using C# in Compact Framework!

 
 
Gavin
Guest
Posts: n/a
 
      2nd Sep 2003
I'm trying develop a SmartPhone application in C#.
But it's bad!
It just can't create menuitem as following code.
---------------------------------------------------
this.mainMenu = new System.Windows.Forms.MainMenu();
this.menuItem1 = new System.Windows.Forms.MenuItem();
this.menuItem11 = new System.Windows.Forms.MenuItem();

this.mainMenu.MenuItems.Add(this.menuItem1);
this.menuItem1.MenuItems.Add(this.menuItem11); <- Fail
---------------------------------------------------
Does anyone know how to do such things in C#?
This is my first little try on CF, I don't think so it's
good as EVC of SmartPhone device!!

 
Reply With Quote
 
 
 
 
Peter Foot [MVP]
Guest
Posts: n/a
 
      2nd Sep 2003
The smartphone is particularly picky about how menus are arrange in order to
comply with the design guidelines. The first menu item (left-hand softkey)
can not have a sub-menu, however the right-hand can. So in your case you
should add a main menu item first with no child items, then add your menu
with sub items so they are placed on the right soft-key.

Peter

--
Peter Foot
Windows Embedded MVP

In The Hand
http://www.inthehand.com

"Gavin" <(E-Mail Removed)> wrote in message
news:054f01c37121$148cb110$(E-Mail Removed)...
> I'm trying develop a SmartPhone application in C#.
> But it's bad!
> It just can't create menuitem as following code.
> ---------------------------------------------------
> this.mainMenu = new System.Windows.Forms.MainMenu();
> this.menuItem1 = new System.Windows.Forms.MenuItem();
> this.menuItem11 = new System.Windows.Forms.MenuItem();
>
> this.mainMenu.MenuItems.Add(this.menuItem1);
> this.menuItem1.MenuItems.Add(this.menuItem11); <- Fail
> ---------------------------------------------------
> Does anyone know how to do such things in C#?
> This is my first little try on CF, I don't think so it's
> good as EVC of SmartPhone device!!
>



 
Reply With Quote
 
Gavin
Guest
Posts: n/a
 
      3rd Sep 2003
Wow! It's really work! I'm so wondering about this picky
rule. However, you just give me another hope to keep
trying on CF in C#. Thanks.


>-----Original Message-----
>The smartphone is particularly picky about how menus are

arrange in order to
>comply with the design guidelines. The first menu item

(left-hand softkey)
>can not have a sub-menu, however the right-hand can. So

in your case you
>should add a main menu item first with no child items,

then add your menu
>with sub items so they are placed on the right soft-key.
>
>Peter
>
>--
>Peter Foot
>Windows Embedded MVP
>
>In The Hand
>http://www.inthehand.com
>
>"Gavin" <(E-Mail Removed)> wrote in message
>news:054f01c37121$148cb110$(E-Mail Removed)...
>> I'm trying develop a SmartPhone application in C#.
>> But it's bad!
>> It just can't create menuitem as following code.
>> ---------------------------------------------------
>> this.mainMenu = new System.Windows.Forms.MainMenu();
>> this.menuItem1 = new System.Windows.Forms.MenuItem();
>> this.menuItem11 = new System.Windows.Forms.MenuItem();
>>
>> this.mainMenu.MenuItems.Add(this.menuItem1);
>> this.menuItem1.MenuItems.Add(this.menuItem11); <- Fail
>> ---------------------------------------------------
>> Does anyone know how to do such things in C#?
>> This is my first little try on CF, I don't think so it's
>> good as EVC of SmartPhone device!!
>>

>
>
>.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create a web service under compact framework ajennings@gmail.com Microsoft Dot NET Compact Framework 3 1st Jun 2007 10:06 AM
How to create a Vertical Tab Control in Compact Framework Dayakar Microsoft Dot NET Compact Framework 0 4th Jan 2007 04:51 PM
Possible to create Compact Framework code outside of emulator? =?Utf-8?B?V2F5bmVN?= Microsoft Dot NET Compact Framework 3 8th Feb 2005 11:11 AM
Re: How can I add icon on menuitem in compact framework? Daniel Moth Microsoft Dot NET Compact Framework 0 3rd Nov 2004 01:48 PM
Re: Create folder with Compact Framework Tim Wilson Microsoft Dot NET Compact Framework 0 21st Jun 2004 07:01 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:13 AM.