Click here to Skip to main content
15,896,063 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to pass null ref type. Pin
Peter_in_27806-Dec-11 13:04
professionalPeter_in_27806-Dec-11 13:04 
GeneralRe: How to pass null ref type. Pin
__John_7-Dec-11 4:36
__John_7-Dec-11 4:36 
QuestionMultilingual keyboard support for C# touchscreen application Pin
PetersCodeProject6-Dec-11 3:06
PetersCodeProject6-Dec-11 3:06 
QuestionRun code if event log entry is older than 12 hours - could you help Pin
CCodeNewbie6-Dec-11 0:15
CCodeNewbie6-Dec-11 0:15 
AnswerRe: Run code if event log entry is older than 12 hours - could you help Pin
Eddy Vluggen6-Dec-11 8:07
professionalEddy Vluggen6-Dec-11 8:07 
QuestionLinq operation [Grouping and Sum] Pin
nitin_ion5-Dec-11 23:16
nitin_ion5-Dec-11 23:16 
AnswerRe: Linq operation [Grouping and Sum] Pin
OriginalGriff6-Dec-11 1:20
mveOriginalGriff6-Dec-11 1:20 
QuestionOpenDialogFile Issue Pin
PDTUM5-Dec-11 7:42
PDTUM5-Dec-11 7:42 
Hello,

I have an application that is composed of 2 forms. The first page launches the second page. On Page 2, I have a "Save As" button that launches a SaveFileDialog box, which works perfectly to save a file. However, whether I save or cancel, after it is done, the application closes Page 2 and restarts on Page 1. I want to application to simply return me to Page 2 where the Save As button is. I have tried several variations but have been unable to make it work that way. I am looking for a piece of code that will allow a new instruction when either Cancel or Save is selected from the SaveFileDialog box. I am including the save dialog code that I am using.

C#
string savedFile = string.Empty;

           // Displays a SaveFileDialog so the user can save the File
           SaveFileDialog saveFD = new SaveFileDialog();
           saveFD.Filter = "Text Files|*.txt|All Files|*.*";
           saveFD.Title = "Save a Text File";

           // If the user does not cancel, open Dialog Box to save the file.
           if (saveFD.ShowDialog() != DialogResult.Cancel)
           {
               savedFile = saveFD.FileName;
               richTextBoxSql.SaveFile(savedFile, RichTextBoxStreamType.PlainText);
           }
           else
           {
              //Code
           }


Any suggestions are gratefully appreciated. Thank You..Pat
AnswerRe: OpenDialogFile Issue Pin
fjdiewornncalwe5-Dec-11 8:30
professionalfjdiewornncalwe5-Dec-11 8:30 
GeneralRe: OpenDialogFile Issue Pin
PDTUM5-Dec-11 12:29
PDTUM5-Dec-11 12:29 
AnswerRe: OpenDialogFile Issue Pin
OriginalGriff5-Dec-11 8:37
mveOriginalGriff5-Dec-11 8:37 
GeneralRe: OpenDialogFile Issue Pin
Luc Pattyn5-Dec-11 10:11
sitebuilderLuc Pattyn5-Dec-11 10:11 
GeneralRe: OpenDialogFile Issue Pin
OriginalGriff5-Dec-11 20:47
mveOriginalGriff5-Dec-11 20:47 
GeneralRe: OpenDialogFile Issue Pin
BillWoodruff6-Dec-11 9:54
professionalBillWoodruff6-Dec-11 9:54 
AnswerRe: OpenDialogFile Issue Pin
SilimSayo5-Dec-11 9:14
SilimSayo5-Dec-11 9:14 
QuestionDrawing wave forms from Wave files Pin
Federico Paolillo5-Dec-11 4:45
Federico Paolillo5-Dec-11 4:45 
AnswerRe: Drawing wave forms from Wave files Pin
Luc Pattyn5-Dec-11 5:11
sitebuilderLuc Pattyn5-Dec-11 5:11 
GeneralRe: Drawing wave forms from Wave files Pin
Federico Paolillo5-Dec-11 5:28
Federico Paolillo5-Dec-11 5:28 
AnswerRe: Drawing wave forms from Wave files Pin
Luc Pattyn5-Dec-11 6:08
sitebuilderLuc Pattyn5-Dec-11 6:08 
QuestionHow to Import data from excel to sql server 2005 Pin
rahul honey4-Dec-11 23:48
rahul honey4-Dec-11 23:48 
AnswerRe: How to Import data from excel to sql server 2005 Pin
RavinderaG5-Dec-11 1:36
RavinderaG5-Dec-11 1:36 
GeneralRe: How to Import data from excel to sql server 2005 Pin
Richard MacCutchan5-Dec-11 1:58
mveRichard MacCutchan5-Dec-11 1:58 
GeneralRe: How to Import data from excel to sql server 2005 Pin
#realJSOP5-Dec-11 2:29
professional#realJSOP5-Dec-11 2:29 
GeneralRe: How to Import data from excel to sql server 2005 Pin
Richard MacCutchan5-Dec-11 2:51
mveRichard MacCutchan5-Dec-11 2:51 
SuggestionRe: How to Import data from excel to sql server 2005 Pin
RaviRanjanKr7-Dec-11 11:51
professionalRaviRanjanKr7-Dec-11 11:51 

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.