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 3722034
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T05:45:37+00:00 2026-05-19T05:45:37+00:00

all,, I have a project that is built in VB.Net 2010 and WPF 4.

  • 0

all,, I have a project that is built in VB.Net 2010 and WPF 4. I have an option to return to a sign-in screen, yet this option can only be accessed from a separate (quit confirmation) window. This function can be called when one of about a hundred windows are open behind the quit confirmation window.

What I want to do is close the quit confirmation window, and the other window that is open, but open the sign-in window. I know to use “Me.Close()” to close the quit confirmation window, and I know how to open the sign-in window, but I do not know how to close the other window that is open.

Help?

  • 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-05-19T05:45:38+00:00Added an answer on May 19, 2026 at 5:45 am

    Couldn’t you give the constructor of the quit-confirmation-window a reference to the window it should close when that option is chosen?

    Edit: Two examples of how to do it:
    Often you’d like to open a confirmation-dialogue when the window is being closed, so you’d create it in the Closing event-handler like this:

        private void Window_Closing(object sender, CancelEventArgs e)
        {
            ConfirmationDialog diag = new ConfirmationDialog();
            diag.ShowDialog();
            switch (diag.Result)
            {
                ...
            }
        }
    

    Here your window waits for the confirmation dialogue to return (diag.Show would not wait), if that is the case you do not need any information about the window in the dialogue itself. (Result is a custom property that you can define in your dialogue if the DialogResult bool is not differentiated enough)

    If your dialogue is opened whenever and you cannot wait for it to return you can create it with a reference:

    private void OpenConfirmDialog()
    {
        ConfirmationDialog diag = new ConfirmationDialog(this);
        diag.Show()
    }
    

    and in your dialogue code:

    public ConfirmationDialog(Window owner)
    {
        Owner = owner;
    }
    
    public void OpenWelcomeScreenThing()
    {
        this.Close();
        Owner.Close();
        new WelcomeScreen().Show();
    }
    

    or something like that. Alternatively you could work with events as well.

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

Sidebar

Related Questions

I have a 2010 project that is targeting .NET v3.5. Inexplicably I can no
I have a .NET project which references another assembly that is built outside of
I have a C# project that references a .NET assembly built from a VB.NET
We have a Library Project that we use for all our central reused code
We have an svn project that also has several plugins in vendor/plugins - all
I have all my views in a project inheriting from a ViewBase class that
In almost all of my projects I have few files that are project wide
I have an 3-layered project, so that all Linq-Querys himself are in the DAL.
I have a visual studio 2010 web project that when I publish it in
I have a Visual Studio 2010 Ultimate C++ project ( not managed or .NET).

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.