Click here to Skip to main content
14,269,202 members

.NET Framework

 
QuestionBindingSource Implementation in .net Win Forms Pin
rjto2-Jan-19 5:01
memberrjto2-Jan-19 5:01 
AnswerRe: BindingSource Implementation in .net Win Forms Pin
Pete O'Hanlon2-Jan-19 5:27
protectorPete O'Hanlon2-Jan-19 5:27 
GeneralRe: BindingSource Implementation in .net Win Forms Pin
rjto2-Jan-19 5:36
memberrjto2-Jan-19 5:36 
GeneralRe: BindingSource Implementation in .net Win Forms Pin
mtoha16-Jan-19 16:19
professionalmtoha16-Jan-19 16:19 
GeneralRe: BindingSource Implementation in .net Win Forms Pin
Pete O'Hanlon16-Jan-19 20:59
protectorPete O'Hanlon16-Jan-19 20:59 
GeneralRe: BindingSource Implementation in .net Win Forms Pin
mtoha16-Jan-19 21:02
professionalmtoha16-Jan-19 21:02 
QuestionDuplicate confirm save prompt when using SaveFileDialog Pin
manic_drummer1-Jan-19 12:39
membermanic_drummer1-Jan-19 12:39 
AnswerRe: Duplicate confirm save prompt when using SaveFileDialog Pin
Dave Kreskowiak1-Jan-19 14:22
mveDave Kreskowiak1-Jan-19 14:22 
Your code is a bit of a mess as it's doing stuff that has nothing to do with saving the file.
DialogResult sfdresult = sfd.ShowDialog();
if (sfdresult == DialogResult.OK)
{
    sslblCurrentOp.Text = "Saving...";
    strFilePath = sfd.FileName;
    mnuSave.PerformClick();
    blFileNeedsSaving = false;
    sslblCurrentOp.Text = "Ready.";
    ssMain.Refresh();
    this.Text = "TriviaPad v3.0 - " + Path.GetFileNameWithoutExtension(strFilePath);
    mnuSave.Enabled = tsbtnSave.Enabled = true;
}

Once you check the DialogResult for OK, you're doing a ton of stuff that has nothing to do with saving the file and that's where you're problem is.

Why on earth are you calling mnuSave.PerformClick()? That just kicks off the event handler that this code is sitting in all over again, including putting up a new Save dialog!

Strip all this stuff out of the if statement, put it into it's own method for updating the user interface, forget the PerformClick call completely, and just do nothing else by save the file.

QuestionVB.net Chained Combo Boxes in Entity framework Pin
Member 1205292129-Dec-18 0:53
memberMember 1205292129-Dec-18 0:53 
AnswerRe: VB.net Chained Combo Boxes in Entity framework Pin
Gerry Schmitz30-Dec-18 8:58
mveGerry Schmitz30-Dec-18 8:58 
QuestionWrong calculator result in VB.net Pin
Member 1410203528-Dec-18 7:18
memberMember 1410203528-Dec-18 7:18 
AnswerRe: Wrong calculator result in VB.net Pin
Dave Kreskowiak28-Dec-18 7:31
mveDave Kreskowiak28-Dec-18 7:31 
AnswerRe: Wrong calculator result in VB.net Pin
Richard MacCutchan28-Dec-18 21:52
protectorRichard MacCutchan28-Dec-18 21:52 
QuestionRole Based Security Pin
latakurekar25-Dec-18 23:23
memberlatakurekar25-Dec-18 23:23 
AnswerRe: Role Based Security Pin
Eddy Vluggen25-Dec-18 23:43
mveEddy Vluggen25-Dec-18 23:43 
AnswerRe: Role Based Security Pin
Nathan Minier26-Dec-18 2:37
professionalNathan Minier26-Dec-18 2:37 
QuestionDoes Dotnet Core Framework required for deploying dotnet core application on Windows IIS? Pin
Syed Shakeer Hussain20-Dec-18 16:42
memberSyed Shakeer Hussain20-Dec-18 16:42 
AnswerRe: Does Dotnet Core Framework required for deploying dotnet core application on Windows IIS? Pin
Eddy Vluggen22-Dec-18 20:55
mveEddy Vluggen22-Dec-18 20:55 
QuestionCustom Windows Forms WebBrowser issues .Net Pin
Member 1184067019-Dec-18 11:28
memberMember 1184067019-Dec-18 11:28 
AnswerRe: Custom Windows Forms WebBrowser issues .Net Pin
Dave Kreskowiak19-Dec-18 13:23
mveDave Kreskowiak19-Dec-18 13:23 
GeneralRe: Custom Windows Forms WebBrowser issues .Net Pin
Member 1184067019-Dec-18 18:28
memberMember 1184067019-Dec-18 18:28 
GeneralRe: Custom Windows Forms WebBrowser issues .Net Pin
Pete O'Hanlon19-Dec-18 21:16
protectorPete O'Hanlon19-Dec-18 21:16 
AnswerRe: Custom Windows Forms WebBrowser issues .Net Pin
Richard Deeming20-Dec-18 1:51
mveRichard Deeming20-Dec-18 1:51 
Questiondifference between angular 1 2 3 4 5 6 and 7 Pin
Mukesh2113-Dec-18 22:48
memberMukesh2113-Dec-18 22:48 
AnswerRe: difference between angular 1 2 3 4 5 6 and 7 Pin
Pete O'Hanlon13-Dec-18 23:02
protectorPete O'Hanlon13-Dec-18 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.