Click here to Skip to main content
15,914,500 members
Home / Discussions / C#
   

C#

 
QuestionC# application to sort SQL database data and output to CSV file Pin
totally_stumped3-Dec-09 4:38
totally_stumped3-Dec-09 4:38 
AnswerRe: C# application to sort SQL database data and output to CSV file Pin
dan!sh 3-Dec-09 4:55
professional dan!sh 3-Dec-09 4:55 
AnswerRe: C# application to sort SQL database data and output to CSV file Pin
Shorgov3-Dec-09 5:13
Shorgov3-Dec-09 5:13 
AnswerRe: C# application to sort SQL database data and output to CSV file Pin
PIEBALDconsult3-Dec-09 5:15
mvePIEBALDconsult3-Dec-09 5:15 
QuestionKilling threads on form closing... Pin
Jacob Dixon3-Dec-09 2:59
Jacob Dixon3-Dec-09 2:59 
AnswerRe: Killing threads on form closing... Pin
Luc Pattyn3-Dec-09 3:12
sitebuilderLuc Pattyn3-Dec-09 3:12 
GeneralRe: Killing threads on form closing... Pin
Jacob Dixon3-Dec-09 3:19
Jacob Dixon3-Dec-09 3:19 
GeneralRe: Killing threads on form closing... Pin
Luc Pattyn3-Dec-09 3:28
sitebuilderLuc Pattyn3-Dec-09 3:28 
1. There are a couple of ways to correctly access the GUI from another thread; I'm strongly in favor of the one I call the "canonical form", as it works on all versions of C# and VB.NET

2.
yes your FormClosing needs to check your app's state and, when necessary, communicate with the user. How exactly is a design choice: "busy" and wait ( Dead | X| ); "busy" + cancel button; "busy" and ignore closing; simply ignore closing ( Dead | X| which makes it look like a bug).
my preference is to save files synchronously, without a thread; the one exception is when you can and often will start saving long before the user is likely to close the form. Anyway I as a user want to make sure things got saved before I drastically change the GUI state.
Rationale: saving what I entered/changed isn't taking as long as me entering/changing it, and I'm willing to spend that time to make sure and avoid the possibility I have to redo it.

Smile | :)

Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]

I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages


GeneralRe: Killing threads on form closing... Pin
Jacob Dixon3-Dec-09 3:36
Jacob Dixon3-Dec-09 3:36 
GeneralRe: Killing threads on form closing... Pin
Luc Pattyn3-Dec-09 3:58
sitebuilderLuc Pattyn3-Dec-09 3:58 
GeneralRe: Killing threads on form closing... Pin
ely_bob3-Dec-09 8:03
professionalely_bob3-Dec-09 8:03 
AnswerRe: Killing threads on form closing... Pin
Nicholas Butler3-Dec-09 3:17
sitebuilderNicholas Butler3-Dec-09 3:17 
GeneralRe: Killing threads on form closing... Pin
Jacob Dixon3-Dec-09 3:21
Jacob Dixon3-Dec-09 3:21 
GeneralRe: Killing threads on form closing... Pin
Nicholas Butler3-Dec-09 3:36
sitebuilderNicholas Butler3-Dec-09 3:36 
AnswerRe: Killing threads on form closing... Pin
Ian Shlasko3-Dec-09 3:20
Ian Shlasko3-Dec-09 3:20 
GeneralRe: Killing threads on form closing... Pin
Jacob Dixon3-Dec-09 3:32
Jacob Dixon3-Dec-09 3:32 
GeneralRe: Killing threads on form closing... Pin
Ian Shlasko3-Dec-09 4:04
Ian Shlasko3-Dec-09 4:04 
GeneralRe: Killing threads on form closing... Pin
Jacob Dixon3-Dec-09 3:43
Jacob Dixon3-Dec-09 3:43 
GeneralRe: Killing threads on form closing... Pin
Luc Pattyn3-Dec-09 5:38
sitebuilderLuc Pattyn3-Dec-09 5:38 
AnswerRe: Killing threads on form closing... Pin
PIEBALDconsult3-Dec-09 4:49
mvePIEBALDconsult3-Dec-09 4:49 
QuestionRedundant function? Pin
Spoon Of Doom3-Dec-09 2:51
Spoon Of Doom3-Dec-09 2:51 
AnswerRe: Redundant function? Pin
David Skelly3-Dec-09 3:05
David Skelly3-Dec-09 3:05 
AnswerRe: Redundant function? Pin
J4amieC3-Dec-09 3:10
J4amieC3-Dec-09 3:10 
AnswerRe: Redundant function? Pin
Spoon Of Doom3-Dec-09 3:25
Spoon Of Doom3-Dec-09 3:25 
QuestionMaking the code in a DLL invisible Pin
Dewald2-Dec-09 22:18
Dewald2-Dec-09 22:18 

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.