Click here to Skip to main content
15,914,642 members
Home / Discussions / Windows Forms
   

Windows Forms

 
Questionneed advice on using window form to generate excel data Pin
neodeaths13-Feb-09 0:21
neodeaths13-Feb-09 0:21 
AnswerRe: need advice on using window form to generate excel data Pin
Ashfield13-Feb-09 1:35
Ashfield13-Feb-09 1:35 
AnswerRe: need advice on using window form to generate excel data Pin
ABitSmart13-Feb-09 1:36
ABitSmart13-Feb-09 1:36 
QuestionClickOnce problem: 1 solutionfile, 2 windows forms projects Pin
mSh198512-Feb-09 21:56
mSh198512-Feb-09 21:56 
AnswerRe: ClickOnce problem: 1 solutionfile, 2 windows forms projects Pin
Calin Tatar12-Feb-09 22:11
Calin Tatar12-Feb-09 22:11 
GeneralRe: ClickOnce problem: 1 solutionfile, 2 windows forms projects Pin
mSh198512-Feb-09 22:17
mSh198512-Feb-09 22:17 
QuestionHow to close specific windows application when Computer is turned off or is restarted . Pin
Vishnu Nath12-Feb-09 1:23
Vishnu Nath12-Feb-09 1:23 
AnswerRe: How to close specific windows application when Computer is turned off or is restarted . [modified] Pin
Alan N12-Feb-09 4:25
Alan N12-Feb-09 4:25 
When Windows wants to shut down it attempts to close all running applications cooperatively and your app must have refused that close request.

Have you coded a FormClosing event handler to stop the application closing?

e.g.
private void Form1_FormClosing(object sender, FormClosingEventArgs e) {
    e.Cancel = true;
}


The good news is that you can fix it.

Take a look at the FormClosingEventArgs.CloseReason Property and code something like this.


private void Form1_FormClosing(object sender, FormClosingEventArgs e) {
  if (e.CloseReason == CloseReason.WindowsShutDown) {
    e.Cancel = false;
  } else {
    e.Cancel = true;
  }
}


Alan.

modified on Thursday, February 12, 2009 11:17 AM

GeneralRe: How to close specific windows application when Computer is turned off or is restarted . Pin
Vishnu Nath12-Feb-09 22:16
Vishnu Nath12-Feb-09 22:16 
GeneralRe: How to close specific windows application when Computer is turned off or is restarted . Pin
Eddy Vluggen13-Feb-09 23:56
professionalEddy Vluggen13-Feb-09 23:56 
GeneralRe: How to close specific windows application when Computer is turned off or is restarted . Pin
Vishnu Nath15-Feb-09 18:45
Vishnu Nath15-Feb-09 18:45 
AnswerRe: How to close specific windows application when Computer is turned off or is restarted . Pin
ashok_rgm20-Feb-09 0:07
ashok_rgm20-Feb-09 0:07 
GeneralRe: How to close specific windows application when Computer is turned off or is restarted . Pin
Vishnu Nath20-Feb-09 18:39
Vishnu Nath20-Feb-09 18:39 
Questionhow do i add values to listbox programmically? [modified] Pin
neodeaths11-Feb-09 22:59
neodeaths11-Feb-09 22:59 
AnswerRe: how do i add values to listbox programmically? Pin
Alan N12-Feb-09 1:20
Alan N12-Feb-09 1:20 
QuestionRe: how do i add values to listbox programmically? Pin
neodeaths12-Feb-09 1:51
neodeaths12-Feb-09 1:51 
AnswerRe: how do i add values to listbox programmically? Pin
Alan N12-Feb-09 3:35
Alan N12-Feb-09 3:35 
GeneralRe: how do i add values to listbox programmically? Pin
neodeaths12-Feb-09 3:42
neodeaths12-Feb-09 3:42 
GeneralRe: how do i add values to listbox programmically? Pin
Alan N12-Feb-09 3:58
Alan N12-Feb-09 3:58 
GeneralRe: how do i add values to listbox programmically? Pin
Alan N12-Feb-09 4:02
Alan N12-Feb-09 4:02 
GeneralRe: how do i add values to listbox programmically? Pin
neodeaths12-Feb-09 5:11
neodeaths12-Feb-09 5:11 
QuestionVSS User Names ? Pin
rajg8210-Feb-09 22:51
rajg8210-Feb-09 22:51 
AnswerRe: VSS User Names ? Pin
Calin Tatar15-Feb-09 8:15
Calin Tatar15-Feb-09 8:15 
QuestionAuto Update Feature for Windows Application similar to FireFox software Update Pin
Vishnu Nath9-Feb-09 3:24
Vishnu Nath9-Feb-09 3:24 
AnswerRe: Auto Update Feature for Windows Application similar to FireFox software Update Pin
Giorgi Dalakishvili9-Feb-09 3:36
mentorGiorgi Dalakishvili9-Feb-09 3:36 

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.