Click here to Skip to main content
15,925,309 members
Home / Discussions / C#
   

C#

 
GeneralRe: Project Indicator Pin
Pafflik23-Mar-07 0:16
Pafflik23-Mar-07 0:16 
GeneralRe: Project Indicator Pin
Pete O'Hanlon23-Mar-07 1:17
mvePete O'Hanlon23-Mar-07 1:17 
GeneralRe: Project Indicator Pin
Pafflik23-Mar-07 1:33
Pafflik23-Mar-07 1:33 
QuestionAdd uninstaller to install directory and shortcuts Pin
Ollie198622-Mar-07 23:47
Ollie198622-Mar-07 23:47 
AnswerRe: Add uninstaller to install directory and shortcuts Pin
Kashif Iqbal Khan24-Mar-07 4:23
Kashif Iqbal Khan24-Mar-07 4:23 
QuestionCombine 'open file' and 'open folder' dialog Pin
nathan722-Mar-07 23:34
nathan722-Mar-07 23:34 
AnswerRe: Combine 'open file' and 'open folder' dialog Pin
Keshav V. Kamat22-Mar-07 23:53
Keshav V. Kamat22-Mar-07 23:53 
GeneralRe: Combine 'open file' and 'open folder' dialog Pin
Stefan Troschuetz23-Mar-07 0:10
Stefan Troschuetz23-Mar-07 0:10 
First of all, the OP is asking for a dialog the lets him open file(s) or a folder. This cannot be achieved with the OpenFileDialog as it is.
Second thing, you should never use goto unless it is really really really necessary. In this case its not. Simply test for DialogResult.OK:
OpenFileDialog ofn = new OpenFileDialog();
ofn.Filter = "XML Files (*.xml)|*.xml";
ofn.Title = "Type File";
if (ofn.ShowDialog() == DialogResult.OK) {
  // Do what needs to be done
}
// Quit without doing anything





"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

AnswerRe: Combine 'open file' and 'open folder' dialog Pin
Keshav V. Kamat22-Mar-07 23:56
Keshav V. Kamat22-Mar-07 23:56 
AnswerRe: Combine 'open file' and 'open folder' dialog Pin
Stefan Troschuetz23-Mar-07 0:15
Stefan Troschuetz23-Mar-07 0:15 
AnswerRe: Combine 'open file' and 'open folder' dialog Pin
joon vh.23-Mar-07 0:59
joon vh.23-Mar-07 0:59 
AnswerRe: Combine 'open file' and 'open folder' dialog Pin
Vikram A Punathambekar23-Mar-07 2:33
Vikram A Punathambekar23-Mar-07 2:33 
QuestionWebBrowser Control --How to use this control Pin
pashitech22-Mar-07 23:31
pashitech22-Mar-07 23:31 
AnswerRe: WebBrowser Control --How to use this control Pin
Keshav V. Kamat23-Mar-07 0:14
Keshav V. Kamat23-Mar-07 0:14 
AnswerRe: WebBrowser Control --How to use this control Pin
joon vh.23-Mar-07 0:53
joon vh.23-Mar-07 0:53 
Questiongenerate xsd Pin
darkcalin22-Mar-07 23:26
darkcalin22-Mar-07 23:26 
AnswerRe: generate xsd Pin
Stefan Troschuetz22-Mar-07 23:33
Stefan Troschuetz22-Mar-07 23:33 
GeneralRe: generate xsd Pin
darkcalin22-Mar-07 23:47
darkcalin22-Mar-07 23:47 
GeneralRe: generate xsd Pin
Stefan Troschuetz23-Mar-07 1:20
Stefan Troschuetz23-Mar-07 1:20 
QuestionRoll back all the Data. Pin
Joshi Rahul22-Mar-07 23:08
Joshi Rahul22-Mar-07 23:08 
Questionhow to show (Application)Process in on Desktop [modified] Pin
Sanjib Raj22-Mar-07 23:05
Sanjib Raj22-Mar-07 23:05 
Questionis there any substitute for AxInterop.SHDocVw.dll and Interop.SHDocVw.dll Pin
Saira Tanwir22-Mar-07 23:04
Saira Tanwir22-Mar-07 23:04 
AnswerRe: is there any substitute for AxInterop.SHDocVw.dll and Interop.SHDocVw.dll Pin
Keshav V. Kamat23-Mar-07 0:06
Keshav V. Kamat23-Mar-07 0:06 
GeneralRe: is there any substitute for AxInterop.SHDocVw.dll and Interop.SHDocVw.dll Pin
Saira Tanwir23-Mar-07 0:38
Saira Tanwir23-Mar-07 0:38 
QuestionMaximizing/restoring a window [modified] Pin
triff22-Mar-07 23:02
triff22-Mar-07 23:02 

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.