PC Review


Reply
Thread Tools Rate Thread

Bug: Can not create Context Menu Separator

 
 
Pawel Achtel
Guest
Posts: n/a
 
      28th Sep 2003
Dear Microsoft,

Runtime crashes in the generated code at line

MenuItem1.Tex t= "-";

Please fix.

Kind Regards,

Pawel Achtel
www.24x7.com.au


 
Reply With Quote
 
 
 
 
Shaun Wilde
Guest
Posts: n/a
 
      28th Sep 2003
Hmm - If this is a top level menu item then it can't be turned into a
seperator - try it in Visual Studio


"Pawel Achtel" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Dear Microsoft,
>
> Runtime crashes in the generated code at line
>
> MenuItem1.Tex t= "-";
>
> Please fix.
>
> Kind Regards,
>
> Pawel Achtel
> www.24x7.com.au
>
>



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.521 / Virus Database: 319 - Release Date: 23/09/2003


 
Reply With Quote
 
Shaun Wilde
Guest
Posts: n/a
 
      28th Sep 2003
I had a look at this a bit further and it does not crash - it does however
throw an exception (NotSuportedException) when you try to convert a menu
item into a seperator and vice versa. It also only does this when the
MenuItem involved is already added to a MainMenu that has been attached to a
form.


Which I don't think is wholly unreasonable and I suspect the phrase used
will be 'as designed'.

"Pawel Achtel" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Dear Microsoft,
>
> Runtime crashes in the generated code at line
>
> MenuItem1.Tex t= "-";
>
> Please fix.
>
> Kind Regards,
>
> Pawel Achtel
> www.24x7.com.au
>
>



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.521 / Virus Database: 319 - Release Date: 23/09/2003


 
Reply With Quote
 
Pawel Achtel
Guest
Posts: n/a
 
      29th Sep 2003
Hi Shaun ,

Saying "Crashes" is the exception. Plus, it is unreasonable, because I tried
to make a separator in a Context Menu, not in a Main Menu. It is a bug in my
view.

Pawel
www.24x7.com.au


"Shaun Wilde" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I had a look at this a bit further and it does not crash - it does however
> throw an exception (NotSuportedException) when you try to convert a menu
> item into a seperator and vice versa. It also only does this when the
> MenuItem involved is already added to a MainMenu that has been attached to

a
> form.
>
>
> Which I don't think is wholly unreasonable and I suspect the phrase used
> will be 'as designed'.
>
> "Pawel Achtel" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Dear Microsoft,
> >
> > Runtime crashes in the generated code at line
> >
> > MenuItem1.Tex t= "-";
> >
> > Please fix.
> >
> > Kind Regards,
> >
> > Pawel Achtel
> > www.24x7.com.au
> >
> >

>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.521 / Virus Database: 319 - Release Date: 23/09/2003
>
>



 
Reply With Quote
 
Alok Sancheti
Guest
Posts: n/a
 
      29th Sep 2003
Same think happened in my code when I tried to add a separator to a context
menu, so I am not using them for now.

"Pawel Achtel" <(E-Mail Removed)> wrote in message
news:ezNr%(E-Mail Removed)...
> Hi Shaun ,
>
> Saying "Crashes" is the exception. Plus, it is unreasonable, because I

tried
> to make a separator in a Context Menu, not in a Main Menu. It is a bug in

my
> view.
>
> Pawel
> www.24x7.com.au
>
>
> "Shaun Wilde" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > I had a look at this a bit further and it does not crash - it does

however
> > throw an exception (NotSuportedException) when you try to convert a menu
> > item into a seperator and vice versa. It also only does this when the
> > MenuItem involved is already added to a MainMenu that has been attached

to
> a
> > form.
> >
> >
> > Which I don't think is wholly unreasonable and I suspect the phrase used
> > will be 'as designed'.
> >
> > "Pawel Achtel" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > Dear Microsoft,
> > >
> > > Runtime crashes in the generated code at line
> > >
> > > MenuItem1.Tex t= "-";
> > >
> > > Please fix.
> > >
> > > Kind Regards,
> > >
> > > Pawel Achtel
> > > www.24x7.com.au
> > >
> > >

> >
> >
> > ---
> > Outgoing mail is certified Virus Free.
> > Checked by AVG anti-virus system (http://www.grisoft.com).
> > Version: 6.0.521 / Virus Database: 319 - Release Date: 23/09/2003
> >
> >

>
>



 
Reply With Quote
 
Shaun Wilde
Guest
Posts: n/a
 
      29th Sep 2003
Hi Pawel

Can you show your actual code ?

Shaun

"Pawel Achtel" <(E-Mail Removed)> wrote in message
news:ezNr%(E-Mail Removed)...
> Hi Shaun ,
>
> Saying "Crashes" is the exception. Plus, it is unreasonable, because I

tried
> to make a separator in a Context Menu, not in a Main Menu. It is a bug in

my
> view.
>
> Pawel
> www.24x7.com.au
>
>
> "Shaun Wilde" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > I had a look at this a bit further and it does not crash - it does

however
> > throw an exception (NotSuportedException) when you try to convert a menu
> > item into a seperator and vice versa. It also only does this when the
> > MenuItem involved is already added to a MainMenu that has been attached

to
> a
> > form.
> >
> >
> > Which I don't think is wholly unreasonable and I suspect the phrase used
> > will be 'as designed'.
> >
> > "Pawel Achtel" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > Dear Microsoft,
> > >
> > > Runtime crashes in the generated code at line
> > >
> > > MenuItem1.Tex t= "-";
> > >
> > > Please fix.
> > >
> > > Kind Regards,
> > >
> > > Pawel Achtel
> > > www.24x7.com.au
> > >
> > >

> >
> >
> > ---
> > Outgoing mail is certified Virus Free.
> > Checked by AVG anti-virus system (http://www.grisoft.com).
> > Version: 6.0.521 / Virus Database: 319 - Release Date: 23/09/2003
> >
> >

>
>



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.521 / Virus Database: 319 - Release Date: 23/09/2003


 
Reply With Quote
 
Pawel Achtel
Guest
Posts: n/a
 
      1st Oct 2003
It is VC 2003 generated code

1. Create a form
2. Create context menu with a few menu items
3. Add separator to the menu (using Add separator function of VS)
4. Studio generates code that essentially puts "-" as a text of the
separator menu item

This does not work (throws exception) in what is essentially VS generated
code

Pawel
www.24x7.com.au

"Shaun Wilde" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi Pawel
>
> Can you show your actual code ?
>
> Shaun
>
> "Pawel Achtel" <(E-Mail Removed)> wrote in message
> news:ezNr%(E-Mail Removed)...
> > Hi Shaun ,
> >
> > Saying "Crashes" is the exception. Plus, it is unreasonable, because I

> tried
> > to make a separator in a Context Menu, not in a Main Menu. It is a bug

in
> my
> > view.
> >
> > Pawel
> > www.24x7.com.au
> >
> >
> > "Shaun Wilde" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > I had a look at this a bit further and it does not crash - it does

> however
> > > throw an exception (NotSuportedException) when you try to convert a

menu
> > > item into a seperator and vice versa. It also only does this when the
> > > MenuItem involved is already added to a MainMenu that has been

attached
> to
> > a
> > > form.
> > >
> > >
> > > Which I don't think is wholly unreasonable and I suspect the phrase

used
> > > will be 'as designed'.
> > >
> > > "Pawel Achtel" <(E-Mail Removed)> wrote in message
> > > news:(E-Mail Removed)...
> > > > Dear Microsoft,
> > > >
> > > > Runtime crashes in the generated code at line
> > > >
> > > > MenuItem1.Tex t= "-";
> > > >
> > > > Please fix.
> > > >
> > > > Kind Regards,
> > > >
> > > > Pawel Achtel
> > > > www.24x7.com.au
> > > >
> > > >
> > >
> > >
> > > ---
> > > Outgoing mail is certified Virus Free.
> > > Checked by AVG anti-virus system (http://www.grisoft.com).
> > > Version: 6.0.521 / Virus Database: 319 - Release Date: 23/09/2003
> > >
> > >

> >
> >

>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.521 / Virus Database: 319 - Release Date: 23/09/2003
>
>



 
Reply With Quote
 
David So [MSFT]
Guest
Posts: n/a
 
      8th Oct 2003
Pawel,

Does this happend on Windows CE platform only or both Pocket PC and Windows
CE platform? There is a know bug where setting a contextmenu item to
separator after it's added to the ContextMenu controls would throw a
NotSupportedException. The problem here is that WinCE has a restriction
that does not allow marking (changing) a menu item as a separator after the
item was added to a contextmenu and the contextmenu was parented by a
control. In VS 2003 the way designer spits the code for device project is
similar to desktop which causes this problem. The work around would be to
add the contextmenu in separate method outside InitilizeComponent.

Hope this helps,

David


This posting is provided "AS IS" with no warranties, and confers no rights.


 
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
Help - Create Context Menu for Text Boxes Kenny Microsoft Excel Programming 0 6th Nov 2008 02:24 AM
Adding a separator to a context menu =?Utf-8?B?R29vZHk=?= Microsoft Excel Programming 1 25th May 2007 03:47 PM
BUG: Can't create file on root from context menu Jared \(Home\) Windows Vista General Discussion 2 30th Nov 2006 11:27 AM
Create and handle dynamic context menu mixahlos Microsoft VB .NET 0 9th May 2006 10:19 AM
Separator line throwing exception in context menu Mark Reddick Microsoft Dot NET Compact Framework 3 17th Sep 2003 11:51 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:44 PM.