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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T07:33:16+00:00 2026-06-14T07:33:16+00:00

VB2010. I must be missing something because I couldn’t find a solution after searching

  • 0

VB2010. I must be missing something because I couldn’t find a solution after searching for an hour. What I want to do is simple. In my app I want to display a modeless form so that it is floating while the user can still interact with the main form.

dim f as New frmColors
f.Show(Me)

But I only want one instance of the form at any time. So how can I prevent more than once instance being displayed, and if there is one instance then just give it focus?

  • 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-14T07:33:17+00:00Added an answer on June 14, 2026 at 7:33 am

    Does something like this work for you, if the form is already visible you can not do a Show, you can just do a BringToFront, also you can check to see if the Form has been disposed so you can New up another one.

    Public Class Form1
        Dim f As New frmColors
    
        Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
            If f.IsDisposed Then f = New frmColors 'To handle user closing form
            CheckForm(f)
        End Sub
    
        Private Sub CheckForm(frm As Form)
            If frm.Visible Then
                frm.BringToFront()
            Else
                frm.Show(Me)
            End If
        End Sub    
    End Class
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I must be missing something, i have VS2010 Premium. Under Templates, Test Projects ->
We are using Silverlight 4 (we must use it. :p ) with VS2010. AFAIK
I'm creating a VB2010 application which will require a connection to MSSQL. Should I
In VS2010, if I click on Test->Run->All Tests in Solution (CTRL+R,A) All of my
I've scoured the Internet but my search-foo must not work if it's out there
I am trying to get Subsonic(3.0.0.4) to work(.Net 3.5 - VS2010), simple install that
I've developed a tool which I use to build other solution files, and if
I'm trying to build a simple RDLC report that shows some data, and has
It seems to be a PITA to get what I want: a working MySQL
What are your must-have extensions for VS2010 development in C/C++? I'm not looking for

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.