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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T08:31:05+00:00 2026-05-28T08:31:05+00:00

VB Windows form Application.. I am developing an application of which part of the

  • 0

VB Windows form Application.. I am developing an application of which part of the program is around configuration settings allowing the user to enter configuration items. When the menubar item for configuration menu is clicked on the main form the menu opens. This is fine but the mainform should not become active again until the configuration menu has closed. This does not happen right now and the mainform simply comes to the foreground and the configuration form goes to the background… I realize that coding an event on the Child form to handle this would not work because the child window loses control and the main form gains control.. I thought of coding a function as follows on the main form but it does not seem logical because i would have to add to it for everyform and do checking to make sure the child is actually open before trying to close it..

 Private Sub Form1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.GotFocus
    MailSettingsWindow.Close()
    RentalSettingsWindow.Close()

End Sub

I did away with the above sub routine and used the below code as per the recomendation of using showdialog which works just as i was looking for.

   Private Sub MailingAndEmailSettingsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MailingAndEmailSettingsToolStripMenuItem.Click
    Dim MailConfig As New MailSettingsWindow()
    MailSettingsWindow.Showdialog()
End Sub
  • 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-28T08:31:06+00:00Added an answer on May 28, 2026 at 8:31 am

    I did away with the above sub routine and used the below code as per the recommendation of using ShowDialog which works just as I was looking for.

    My code is as follows:

    Private Sub MailingAndEmailSettingsMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles MailingAndEmailSettingsMenuItem.Click
        Dim MailConfig As New MailSettingsWindow()
        MailSettingsWindow.ShowDialog()
    End Sub 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We are developing C# .net 4.0 Windows Form Based Application. Here, User Will enter
I am Developing Windows Form Application in .Net, I want to insert selected rows
I have been developing a C# windows form application in XP. It all works
I'm developing C# .NET windows Forms application. In which I've a main window and
I am currently developing a C# Windows Form Application. Now I am trying to
I am currently developing a C# Windows Form Application. In the main form, there
Which use of connection management is better while developing a windows based application which
I am developing an application which requires the user to drag a file from
I am developing a Windows application in which I want to display a pop-up
I'm developing a windows form application. Could any one please advise what are the

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.