Click here to Skip to main content
15,890,995 members
Home / Discussions / C#
   

C#

 
AnswerRe: Game in C# Pin
Eddy Vluggen1-May-12 8:45
professionalEddy Vluggen1-May-12 8:45 
GeneralRe: Game in C# Pin
Qobacha1-May-12 12:50
Qobacha1-May-12 12:50 
GeneralRe: Game in C# Pin
Eddy Vluggen2-May-12 6:47
professionalEddy Vluggen2-May-12 6:47 
AnswerRe: Dodger Game in C# Pin
Abhinav S19-Apr-12 16:28
Abhinav S19-Apr-12 16:28 
GeneralRe: Dodger Game in C# Pin
CDP180220-Apr-12 4:03
CDP180220-Apr-12 4:03 
GeneralRe: Dodger Game in C# Pin
Qobacha20-Apr-12 10:52
Qobacha20-Apr-12 10:52 
GeneralRe: Dodger Game in C# Pin
Qobacha20-Apr-12 10:51
Qobacha20-Apr-12 10:51 
QuestionMenuStrip Erroneously Closing Pin
Skippums19-Apr-12 7:27
Skippums19-Apr-12 7:27 
I have a MenuStrip that contains ToolStripMenuItem's with submenus. In a few of the submenus, I have two ToolStripMenuItem's to move up or down a list of options with keyboard shortcuts. For example:
RootMenuItem (e.g. File)
  SubItem0 (e.g. New)
  SubItem1
    SelectPrevious (Ctrl+Left)
    SelectNext     (Ctrl+Right)
    ---------------------------
    Option 0
    Option 1
    ...
    Option N
  SubItem2
    SelectPrevious (Ctrl+Up)
    SelectNext     (Ctrl+Down)
    --------------------------
    Option 0
    Option 1
    ...
    Option M
Now, all of the "Option N" ToolStripMenuItem's have their CheckOnClick property set to true, and they all have the same event handler. When I click the "SelectPrevious" or "SelectNext" options, everything works fine (Option N is unchecked, and Option (N - 1) or (N + 1) is checked, as appropriate). In addition, if the final option is selected SelectNext is disabled, and the same for SelectPrevious when the first option is selected.

Here is the problem: If I use any of the keyboard shortcuts for SelectPrevious or SelectNext, the next time I hover over the associated SubItem, then hover over a different SubItem, the entire menu is closed.

Here are the steps to reproduce:
1. RootMenuItem->SubItem1->SelectPrevious using the shortcut Ctrl+Left
2. Hover over RootMenuItem->SubItem1 until the submenu appears
3. Move the mouse over RootMenuItem->SubItem0 (or SubItem2)

After step 3, the entire menu closes. The next time I attempt to open the menu (without using a keyboard shortcut in between), everything works fine. Basically, every time I use the keyboard shortcuts any number of consecutive times, the next time I open the submenu that hosts a ToolStripMenuItem that was clicked via a keyboard shortcut, the menu closes and resets to some "good" state that allows it to work correctly the next time.

Has anyone else experienced this? Is there any way to fix it, or is it just a .Net bug? I'm using .Net 4.0 on Windows XP SP3, in case it matters. Thanks,
Sounds like somebody's got a case of the Mondays

-Jeff

AnswerRe: MenuStrip Erroneously Closing Pin
Alan N19-Apr-12 10:05
Alan N19-Apr-12 10:05 
GeneralRe: MenuStrip Erroneously Closing Pin
Skippums19-Apr-12 10:46
Skippums19-Apr-12 10:46 
QuestionJust a C# application. Pin
amx_tiger19-Apr-12 6:17
amx_tiger19-Apr-12 6:17 
AnswerRe: Just a C# application. Pin
Eddy Vluggen19-Apr-12 9:46
professionalEddy Vluggen19-Apr-12 9:46 
GeneralRe: Just a C# application. Pin
amx_tiger19-Apr-12 10:26
amx_tiger19-Apr-12 10:26 
AnswerRe: Just a C# application. Pin
Eddy Vluggen19-Apr-12 11:02
professionalEddy Vluggen19-Apr-12 11:02 
GeneralRe: Just a C# application. Pin
amx_tiger19-Apr-12 20:08
amx_tiger19-Apr-12 20:08 
GeneralRe: Just a C# application. Pin
Sentenryu20-Apr-12 1:29
Sentenryu20-Apr-12 1:29 
GeneralRe: Just a C# application. Pin
amx_tiger20-Apr-12 4:52
amx_tiger20-Apr-12 4:52 
QuestionProblems deploying Soap MTOM service WCF with Java Client Pin
sfinxrecord1319-Apr-12 5:10
sfinxrecord1319-Apr-12 5:10 
Questionappalication development Pin
ramnath_k19-Apr-12 4:37
ramnath_k19-Apr-12 4:37 
AnswerRe: appalication development Pin
JimmeP19-Apr-12 4:53
JimmeP19-Apr-12 4:53 
AnswerRe: appalication development Pin
phil.o19-Apr-12 5:00
professionalphil.o19-Apr-12 5:00 
AnswerRe: appalication development Pin
Wes Aday19-Apr-12 5:08
professionalWes Aday19-Apr-12 5:08 
AnswerRe: appalication development Pin
Pete O'Hanlon19-Apr-12 5:45
mvePete O'Hanlon19-Apr-12 5:45 
QuestionWindows Service Debug on VS2010 Pin
garfield18519-Apr-12 4:35
garfield18519-Apr-12 4:35 
AnswerRe: Windows Service Debug on VS2010 Pin
S@53K^S19-Apr-12 9:54
S@53K^S19-Apr-12 9:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.