Click here to Skip to main content
16,007,809 members
Home / Discussions / C#
   

C#

 
AnswerRe: enum types... Pin
Dustin Metzgar11-Aug-06 10:42
Dustin Metzgar11-Aug-06 10:42 
GeneralRe: enum types... Pin
Besinci11-Aug-06 10:50
Besinci11-Aug-06 10:50 
GeneralRe: enum types... Pin
Dustin Metzgar11-Aug-06 11:01
Dustin Metzgar11-Aug-06 11:01 
QuestionExiting app in Catch Pin
Stick^11-Aug-06 10:01
Stick^11-Aug-06 10:01 
AnswerRe: Exiting app in Catch Pin
Stefan Troschuetz11-Aug-06 10:47
Stefan Troschuetz11-Aug-06 10:47 
GeneralRe: Exiting app in Catch Pin
Stick^11-Aug-06 10:58
Stick^11-Aug-06 10:58 
GeneralRe: Exiting app in Catch Pin
Ennis Ray Lynch, Jr.11-Aug-06 11:08
Ennis Ray Lynch, Jr.11-Aug-06 11:08 
GeneralRe: Exiting app in Catch Pin
Stefan Troschuetz11-Aug-06 20:40
Stefan Troschuetz11-Aug-06 20:40 
Problem is that during construction of your form, Application.Run(..) isn't executed yet as where are in the state of creating the form object that gets passed into. So you cannot exit what isn't running yet.
So either move the code into an event handler for the forms Load event as suggested by the others or even put the check for crucial files inside the main method before you call Application.Run(..). Additionally I suggest using File.Exists which is much nicer than catching exceptions.


"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook

www.troschuetz.de

GeneralRe: Exiting app in Catch Pin
Stick^11-Aug-06 23:26
Stick^11-Aug-06 23:26 
AnswerRe: Exiting app in Catch Pin
Glen Harvy11-Aug-06 10:54
Glen Harvy11-Aug-06 10:54 
GeneralRe: Exiting app in Catch Pin
Stick^11-Aug-06 10:59
Stick^11-Aug-06 10:59 
GeneralWrong forum by accident...please ignore! Pin
leckey11-Aug-06 9:51
leckey11-Aug-06 9:51 
AnswerRe: Null reference object error/enumeration problem Pin
Judah Gabriel Himango11-Aug-06 10:00
sponsorJudah Gabriel Himango11-Aug-06 10:00 
GeneralRe: Null reference object error/enumeration problem Pin
leckey11-Aug-06 11:46
leckey11-Aug-06 11:46 
GeneralDatagridViewComboCell Issues. Pin
ssp2011-Aug-06 9:49
ssp2011-Aug-06 9:49 
QuestionInterop.Excel x the memory could not be read Pin
ARLUNSQUI11-Aug-06 8:53
ARLUNSQUI11-Aug-06 8:53 
QuestionHow can a control always be on top Pin
sas949111-Aug-06 7:57
sas949111-Aug-06 7:57 
AnswerRe: How can a control always be on top Pin
Ryomin11-Aug-06 8:25
professionalRyomin11-Aug-06 8:25 
GeneralRe: How can a control always be on top Pin
sas949111-Aug-06 9:14
sas949111-Aug-06 9:14 
GeneralRe: How can a control always be on top [modified] Pin
Ryomin11-Aug-06 9:20
professionalRyomin11-Aug-06 9:20 
GeneralRe: How can a control always be on top Pin
sas949111-Aug-06 9:27
sas949111-Aug-06 9:27 
GeneralRe: How can a control always be on top Pin
Ennis Ray Lynch, Jr.11-Aug-06 9:41
Ennis Ray Lynch, Jr.11-Aug-06 9:41 
Questionaccess database on a server via a windows application? Pin
keroed_edmond11-Aug-06 4:20
keroed_edmond11-Aug-06 4:20 
AnswerRe: access database on a server via a windows application? Pin
Not Active11-Aug-06 4:32
mentorNot Active11-Aug-06 4:32 
GeneralRe: access database on a server via a windows application? Pin
Guffa11-Aug-06 8:06
Guffa11-Aug-06 8:06 

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.