?
Solved

Giving Focus to a form

Posted on 2005-04-27
6
Medium Priority
?
165 Views
Last Modified: 2010-04-23
Friends,

Upon load, I want to open a form and keep the focus there until the user has clicked okay.  How do I do that?

Currently, the form opens, but the newly opened window is now hidden behind the main form.

Here is the code:


    Private Sub Main_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        SetBlendLine = New BlendLine
        SetBlendLine.Show()

    End Sub

Regards,
Eric
0
Comment
Question by:indy500fan
  • 4
  • 2
6 Comments
 
LVL 8

Expert Comment

by:toddhd
ID: 13882258
In the Blendline form...

'Put this in form_load
Me.TopMost = True
0
 

Author Comment

by:indy500fan
ID: 13882259
Thanks toddhd!!!
0
 
LVL 8

Accepted Solution

by:
toddhd earned 2000 total points
ID: 13882260
Or you can try:

SetBlendLine.ShowDialog()

which should show the form in modal form
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:indy500fan
ID: 13882264
Thanks, I'll try that!!!
0
 

Author Comment

by:indy500fan
ID: 13882302
Even Better!!!  Thanks Todd!!!
0
 

Author Comment

by:indy500fan
ID: 13892115
Todd,

Sorry about that.  I forgot to give you the points!

Eric
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Loops Section Overview
Suggested Courses

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question