How to show a form that needs to be hidden immediately.


Author
Message
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (4.8K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
I have a form that I'd like to load, but have it hidden immediately. I'm currently just setting visible to False after it's done loading, but there is flicker. Is there a suggested way to do this.
Reply
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (4.8K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Just noticed that I never let y'all know what I actually did. I ended up adding a method to the form to show the browse dialog, then if the dialog returns OK, show the form. Sort of a combo between what I was trying and what Trent suggested:



' In the form that I wanted hidden...

Public Sub Search()

  ' Open search form, test for OK

  Using myBrw As New MyBrowseDialog()

    If myBrw.ShowDialog() = DialogResult.OK Then

      Me.Show()

    Else

      Me.Close

    End If

  End Using

End Sub




And it is called like this

' To run a search...

Dim frm As New MyForm()

frm.Search()

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Greg McGuffey - 17 Years Ago
Edhy Rijo - 17 Years Ago
Greg McGuffey - 17 Years Ago
Edhy Rijo - 17 Years Ago
Greg McGuffey - 17 Years Ago
                         What about something like this: [codesnippet] Public Shared...
Edhy Rijo - 17 Years Ago
                             Nope, that won't work as this is being called in a class that isn't a...
Greg McGuffey - 17 Years Ago
                                 When I have the need for this, I take a different approach. First,...
Trent L. Taylor - 17 Years Ago
                                     Just noticed that I never let y'all know what I actually did. I ended...
Greg McGuffey - 17 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search