I have, but I can't tell when the second instance of the form is getting created.
>OK then, let's try this ... have you tried debugging and stepping through the code to see what's happening that way?
>
>~~Bonnie
>
>
>
>>I don't think that's what is happening because it does it every time - not just intermittently, but thanks for the suggestion.
>>
>>
>>
>>>Steve,
>>>
>>>That seems weird ... are you sure you didn't click on the button twice by accident? My mouse seems to have a mind of it's own and sometimes it clicks twice, seemingly by itself.
>>>
>>>
>>>~~Bonnie
>>>
>>>
>>>
>>>>I am trying to create my first Windows Forms application. I created a Main form and added a Main Menu to it. I added a second Windows Form called Questionaires. I created code for the click event of one of my main menu items on the main form that looks like:
>>>>
>>>>private void miQuestionaires_Click(object sender, System.EventArgs e)
>>>>{
>>>> Form frmQuestionaires = new Questionaires();
>>>> frmQuestionaires.Show();
>>>>}
>>>>
>>>>The problem is that when I click on the "Questionaires" menu item, 2 instances of the Questionaires form are displayed.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement