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

C#

 
GeneralRe: How to call function with optional parameter in C#? Pin
Simon P Stevens13-Nov-08 23:22
Simon P Stevens13-Nov-08 23:22 
AnswerRe: How to call function with optional parameter in C#? Pin
Wael Al Wirr16-Nov-08 1:28
Wael Al Wirr16-Nov-08 1:28 
QuestionDateTimePicker in C#.net Windows application Pin
Justin Jose13-Nov-08 19:59
Justin Jose13-Nov-08 19:59 
AnswerRe: DateTimePicker in C#.net Windows application Pin
Deflinek13-Nov-08 21:28
Deflinek13-Nov-08 21:28 
GeneralRe: DateTimePicker in C#.net Windows application Pin
Justin Jose14-Nov-08 0:19
Justin Jose14-Nov-08 0:19 
QuestionHow to go particular previous page without losing gridview data in that page [modified] Pin
B.Balachandhar13-Nov-08 19:30
B.Balachandhar13-Nov-08 19:30 
AnswerRe: How to go particular previous page without losing gridview data in that page Pin
Dave Kreskowiak14-Nov-08 4:04
mveDave Kreskowiak14-Nov-08 4:04 
QuestionHow to cancel System from Shutdown using C#.net Pin
K V Sekhar13-Nov-08 19:15
K V Sekhar13-Nov-08 19:15 
Hi all,

I am working Windows application. I have a requirement of downloading the files from a website.

When the application is runnning (downloading files), if user shutdown the
the system i need to cancel that shutdown and i have to display message like "Downloading files is not completed.You want stop Downloading files, if yes Click on btn_ShutDown ,if not btn_CancelShutDown.

For that i used Form1_Closing Event.

private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
if (e.CloseReason.Equals(CloseReason.WindowsShutDown))
{
// I dont know the actual logic, but i tried the below one. But its not working
e.Cancel; // But its not working.
}
}


Please suggest me how to cancel the Shutdowning of system.


Thanks in advance.
AnswerRe: How to cancel System from Shutdown using C#.net Pin
Vimalsoft(Pty) Ltd13-Nov-08 19:43
professionalVimalsoft(Pty) Ltd13-Nov-08 19:43 
GeneralRe: How to cancel System from Shutdown using C#.net Pin
K V Sekhar13-Nov-08 22:15
K V Sekhar13-Nov-08 22:15 
GeneralRe: How to cancel System from Shutdown using C#.net Pin
Dave Kreskowiak14-Nov-08 3:56
mveDave Kreskowiak14-Nov-08 3:56 
AnswerRe: How to cancel System from Shutdown using C#.net Pin
Matjaz-xyz13-Nov-08 19:46
Matjaz-xyz13-Nov-08 19:46 
AnswerRe: How to cancel System from Shutdown using C#.net Pin
sph3rex13-Nov-08 19:56
sph3rex13-Nov-08 19:56 
GeneralRe: How to cancel System from Shutdown using C#.net Pin
Matjaz-xyz13-Nov-08 20:02
Matjaz-xyz13-Nov-08 20:02 
QuestionC# - APP : Monitor Copy-Paste Process Pin
Wahyu Hidayat13-Nov-08 16:56
Wahyu Hidayat13-Nov-08 16:56 
AnswerRe: C# - APP : Monitor Copy-Paste Process Pin
Dave Kreskowiak13-Nov-08 18:27
mveDave Kreskowiak13-Nov-08 18:27 
GeneralRe: C# - APP : Monitor Copy-Paste Process Pin
Paul Conrad13-Nov-08 19:26
professionalPaul Conrad13-Nov-08 19:26 
QuestionJust a thanks to all that have provided code for us to think about. Pin
Just me at will_george...something13-Nov-08 16:49
Just me at will_george...something13-Nov-08 16:49 
AnswerRe: Just a thanks to all that have provided code for us to think about. Pin
Simon P Stevens13-Nov-08 22:51
Simon P Stevens13-Nov-08 22:51 
GeneralRe: Just a thanks to all that have provided code for us to think about. Pin
jas0n2315-Nov-08 2:46
jas0n2315-Nov-08 2:46 
GeneralRe: Just a thanks to all that have provided code for us to think about. Pin
Simon P Stevens16-Nov-08 4:14
Simon P Stevens16-Nov-08 4:14 
QuestionHelp with DownloadFileCompleted event Pin
EliottA13-Nov-08 15:09
EliottA13-Nov-08 15:09 
AnswerRe: Help with DownloadFileCompleted event Pin
Ben Fair14-Nov-08 2:51
Ben Fair14-Nov-08 2:51 
QuestionStereo Image Rectification Software! Pin
farid_colombia13-Nov-08 15:06
farid_colombia13-Nov-08 15:06 
AnswerRe: Stereo Image Rectification Software! Pin
Dave Kreskowiak13-Nov-08 18:24
mveDave Kreskowiak13-Nov-08 18:24 

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.