Click here to Skip to main content
15,889,027 members
Home / Discussions / C#
   

C#

 
GeneralListView with sub-lists Pin
Jon G28-Apr-04 4:54
Jon G28-Apr-04 4:54 
GeneralRe: ListView with sub-lists Pin
Dave Kreskowiak28-Apr-04 5:17
mveDave Kreskowiak28-Apr-04 5:17 
GeneralRe: ListView with sub-lists Pin
Jon G28-Apr-04 5:26
Jon G28-Apr-04 5:26 
GeneralRe: ListView with sub-lists Pin
RNEELY28-Apr-04 6:15
RNEELY28-Apr-04 6:15 
GeneralRe: ListView with sub-lists Pin
Heath Stewart28-Apr-04 6:20
protectorHeath Stewart28-Apr-04 6:20 
GeneralRe: ListView with sub-lists Pin
Heath Stewart28-Apr-04 6:23
protectorHeath Stewart28-Apr-04 6:23 
GeneralRe: ListView with sub-lists Pin
Jon G28-Apr-04 6:31
Jon G28-Apr-04 6:31 
GeneralDetermining app close by User or Windows Pin
ABean28-Apr-04 4:03
ABean28-Apr-04 4:03 
I have a C# Windows Form that contains the logic to display an icon in the systray. I have that form hidden (visible = false). When the user clicks the systray icon I unhide the form (visible = true) to allow the user to change some settings. When the user finishes changing the settings he can click the close button (the X in the top right corner).

In the frm.closing event I have this:
this.Visible = false;
e.Cancel = true;

That code will hide the form for later use and it keeps the application from exiting.

Life is good UNTIL the user goes to shutdown the computer. During the shutdown process Windows goes to close my application; but my app sends Windows the Cancel signal and so Windows never shuts down. I’m about ready to hack something up with WndProc but I was hoping there might be some way to tell if whether my app is being closed by Windows or by a click of the close button (the X in the top right corner).

Thanks.

GeneralRe: Determining app close by User or Windows Pin
Heath Stewart28-Apr-04 4:14
protectorHeath Stewart28-Apr-04 4:14 
GeneralStatic to Instance Pin
sreejith ss nair28-Apr-04 3:53
sreejith ss nair28-Apr-04 3:53 
GeneralRe: Static to Instance Pin
Colin Angus Mackay28-Apr-04 4:02
Colin Angus Mackay28-Apr-04 4:02 
GeneralRe: Static to Instance Pin
Heath Stewart28-Apr-04 4:09
protectorHeath Stewart28-Apr-04 4:09 
GeneralRe: Static to Instance Pin
Jeff Varszegi28-Apr-04 4:37
professionalJeff Varszegi28-Apr-04 4:37 
GeneralRe: Static to Instance Pin
Dave Kreskowiak28-Apr-04 4:17
mveDave Kreskowiak28-Apr-04 4:17 
GeneralRe: Static to Instance Pin
Jeff Varszegi28-Apr-04 4:35
professionalJeff Varszegi28-Apr-04 4:35 
Generallist as parameter (C++/C# interoperability) Pin
sharonz28-Apr-04 2:25
sharonz28-Apr-04 2:25 
GeneralRe: list as parameter (C++/C# interoperability) Pin
Heath Stewart28-Apr-04 3:56
protectorHeath Stewart28-Apr-04 3:56 
GeneralRe: list as parameter (C++/C# interoperability) Pin
sharonz28-Apr-04 4:22
sharonz28-Apr-04 4:22 
GeneralRe: list as parameter (C++/C# interoperability) Pin
Roman Rodov28-Apr-04 15:37
Roman Rodov28-Apr-04 15:37 
GeneralRe: list as parameter (C++/C# interoperability) Pin
sharonz28-Apr-04 20:57
sharonz28-Apr-04 20:57 
QuestionUnique integer from string? Pin
Nathan Ridley28-Apr-04 2:20
Nathan Ridley28-Apr-04 2:20 
AnswerRe: Unique integer from string? Pin
amatyasik28-Apr-04 3:46
amatyasik28-Apr-04 3:46 
AnswerRe: Unique integer from string? Pin
Heath Stewart28-Apr-04 3:53
protectorHeath Stewart28-Apr-04 3:53 
AnswerRe: Unique integer from string? Pin
Jeff Varszegi28-Apr-04 4:49
professionalJeff Varszegi28-Apr-04 4:49 
GeneralRe: Unique integer from string? Pin
Nathan Ridley28-Apr-04 17:57
Nathan Ridley28-Apr-04 17:57 

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.