Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8195479
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T05:09:10+00:00 2026-06-07T05:09:10+00:00

I have a save file dialog set up to display but when I click

  • 0

I have a save file dialog set up to display but when I click off of it the dialog it disappears into the background without a tab or anything. My question is how do I make the dialog modal? If you don’t know what I mean go into notepad hit save as and try to click off the dialog. You will see the window flashes and you get a nice sound informing you that you must do something in the dialog before doing anything else. I would like to achieve this effect with my dialog but I don’t know how. I cannot simply use the Form.Modal property because that deals with forms and this isn’t a Form. Could someone help me out here?

Thanks.

EDIT:

This is how I’m showing the dialog, it’s running in XNA and when I click the save as button the EntrySelected() method is called:

    private void EntrySelected(object sender, EventArgs e) {
        if(sender == saveAsEntry) {
            sfd = new SaveFileDialog();
            thread = new Thread(ShowSaveDialog);
            thread.SetApartmentState(ApartmentState.STA);
            thread.Start();
        }
        ...
    }
    private void ShowSaveDialog() {
        if(sfd.ShowDialog() == System.Windows.Forms.DialogResult.OK) {
            World.Save(sfd.FileName);
            thread.Abort();
        }
        else {
            thread.Abort();
        }
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T05:09:12+00:00Added an answer on June 7, 2026 at 5:09 am

    Actualy your Dialog is a Form, As the above comment suggests there is not a Show method, you should be using ShowDialog() Command that opens it up as a Modal Dialog.

    i.e.

    SaveFileDialog1.ShowDialog();
    

    Base on your edit, there is a version of ShowDialog where you assign the owner to the Dialog, maybe that will work for you.

    SaveFileDialog1.ShowDialog(dialogOwner);
    

    From above link:

    This version of the ShowDialog method allows you to specify a specific form or control that will own the dialog box that is shown. If you use the version of this method that has no parameters, the dialog box being shown would be owned automatically by the currently active window of your application.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'd like to have my VBScript display the Windows Save As dialog box, but
I have a dialog using JFileChooser. When I save a file by FileOutputStream ,
I want to open a save file dialog, have the user enter a filename,
I'm trying to save a file in which I have some credentials. In order
I have a macro setup to automatically open/save a file that I am opening
I have the following method to save an Object to a file: // Save
How can we save log-file of our application actions on SD-card? We should have
I have a job to import excel file and save the data to database
We have a part of our program which can save a diagnostic file for
I have found only two methods (SaveFile, LoadFile) which save in a file. How

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.