Click here to Skip to main content
15,891,757 members
Home / Discussions / C#
   

C#

 
QuestionMessage Removed Pin
5-Mar-15 8:19
professionalN_tro_P5-Mar-15 8:19 
AnswerRe: EntityFramework Disable Lazy loading Pin
Dave Kreskowiak5-Mar-15 10:10
mveDave Kreskowiak5-Mar-15 10:10 
GeneralMessage Removed Pin
5-Mar-15 11:02
professionalN_tro_P5-Mar-15 11:02 
GeneralRe: EntityFramework Disable Lazy loading Pin
Matt T Heffron5-Mar-15 12:00
professionalMatt T Heffron5-Mar-15 12:00 
GeneralMessage Removed Pin
5-Mar-15 11:24
professionalN_tro_P5-Mar-15 11:24 
GeneralRe: EntityFramework Disable Lazy loading Pin
Dave Kreskowiak5-Mar-15 12:09
mveDave Kreskowiak5-Mar-15 12:09 
AnswerRe: EntityFramework Disable Lazy loading Pin
Gerry Schmitz5-Mar-15 12:23
mveGerry Schmitz5-Mar-15 12:23 
Questionsolved: WinForms: What would make closing a MainForm require two Clicks on the ControlBox ? Pin
BillWoodruff5-Mar-15 2:08
professionalBillWoodruff5-Mar-15 2:08 
Note: I'm using VS 2015 CTP 6, but I have not seen this issue outside the Application described here using VS 2015. I observe the same behavior if the project is opened in Visual Studio 2013.

My MainForm instantiates a second utility Form, and the 'Owner property of that utility Form instance is set to the instance of the MainForm. There is only one instance of the utility Form created.

The utility Form has its FormClosing Event set so it hides the utility Form, rather than allowing it to be closed (by setting the FromClosingEventArgs.cancel property to 'true).

Here's the MainForm 'Closing EventHandler:
C#
private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
{
    if(utilityForm != null) utilityForm .Dispose();
    
    // e.Cancel = false; // disable this and it takes two clicks to close the MainForm !
}
How could omitting explicitly setting the value of e.Cancel to 'false in the MainForm's code produce this behavior ? Calling utilityForm.Dispose should have no possible impact on the FormClosingEventArgs of the MainForm.

Appreciate any ideas.

thanks, Bill
«To kill an error is as good a service as, and sometimes even better than, the establishing of a new truth or fact» Charles Darwin in "Prospero's Precepts"<</font>


modified 5-Mar-15 9:57am.

AnswerRe: WinForms: What would make closing a MainForm require two Clicks on the ControlBox ? Pin
Alan N5-Mar-15 2:58
Alan N5-Mar-15 2:58 
GeneralRe: WinForms: What would make closing a MainForm require two Clicks on the ControlBox ? Pin
BillWoodruff5-Mar-15 3:50
professionalBillWoodruff5-Mar-15 3:50 
QuestionMemoryStream with PDF Pin
Jassim Rahma4-Mar-15 22:18
Jassim Rahma4-Mar-15 22:18 
AnswerRe: MemoryStream with PDF Pin
Pete O'Hanlon4-Mar-15 22:21
mvePete O'Hanlon4-Mar-15 22:21 
QuestionSend Mouse motion using sendMessage() Pin
Omarkkk4-Mar-15 22:10
Omarkkk4-Mar-15 22:10 
AnswerRe: Send Mouse motion using sendMessage() Pin
Gerry Schmitz4-Mar-15 23:52
mveGerry Schmitz4-Mar-15 23:52 
GeneralRe: Send Mouse motion using sendMessage() Pin
BillWoodruff5-Mar-15 3:48
professionalBillWoodruff5-Mar-15 3:48 
GeneralRe: Send Mouse motion using sendMessage() Pin
Gerry Schmitz5-Mar-15 5:27
mveGerry Schmitz5-Mar-15 5:27 
GeneralRe: Send Mouse motion using sendMessage() Pin
Pete O'Hanlon5-Mar-15 7:12
mvePete O'Hanlon5-Mar-15 7:12 
GeneralRe: Send Mouse motion using sendMessage() Pin
Gerry Schmitz5-Mar-15 11:00
mveGerry Schmitz5-Mar-15 11:00 
Questionhow to design E R D for language dictionary Pin
Member 112641494-Mar-15 19:02
Member 112641494-Mar-15 19:02 
AnswerRe: how to design E R D for language dictionary Pin
OriginalGriff4-Mar-15 19:43
mveOriginalGriff4-Mar-15 19:43 
AnswerRe: how to design E R D for language dictionary Pin
Pete O'Hanlon4-Mar-15 22:19
mvePete O'Hanlon4-Mar-15 22:19 
QuestionRunning forms in a thread in .NET Pin
landersohn694-Mar-15 8:45
landersohn694-Mar-15 8:45 
AnswerRe: Running forms in a thread in .NET PinPopular
Eddy Vluggen4-Mar-15 9:04
professionalEddy Vluggen4-Mar-15 9:04 
GeneralRe: Running forms in a thread in .NET Pin
landersohn694-Mar-15 9:18
landersohn694-Mar-15 9:18 
GeneralRe: Running forms in a thread in .NET Pin
Eddy Vluggen4-Mar-15 9:29
professionalEddy Vluggen4-Mar-15 9:29 

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.