Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

About Focus ... ?

Status
Not open for further replies.

todd666

IS-IT--Management
Dec 3, 2001
61
CA
On my principal form of my program, there is a datagrid and one textbox.

When I am adding or modifying a record in my DataGrid, if I click on another program on the task bar and I came back to my program, the cursor is not in DataGrid, he's in the textbox.

What can I do if I want the cursor stay on my DataGrid if I was in before clicking on another program?

Some help will be very appreciate... Thank You in advance.

 
Sounds like you are probably setting the focus in your Form_Activate event.

You might think of changing that to the load event, or perhaps keep a form level reference to the control that should have focus, and then manually set the focus in the activate event.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top