-
Opening a new form from a TreeView
I have a TreeView that I use to navigate to a new form. In an AfterSelect event method for the TreeView I use the following code to open the new form:
XPMApp.Detail = new DetailForm(this);
XPMApp.Detail.Show();
XPMApp.Detail.Focus();
The problem is that the new form opens and flashes in front on me, but focus goes back to/stays with the 1st form, and specifically the selected treeview.
Any idea how to set the focus properly? Am I using the wrong event handler?
-
Found the answer to this issue on MSDN forums:
http://forums.microsoft.com/MSDN/Sho...20134&SiteID=1
The key is to use the MouseMove event, since it fires last.
Hope this helps anyone with a similar issue!
Spencer
Similar Threads
-
By vikramjparekh in forum ASP.NET
Replies: 2
Last Post: 07-24-2005, 10:21 PM
-
By MacataQ in forum VB Classic
Replies: 4
Last Post: 07-05-2005, 12:00 PM
-
By Sayana Srinivasa Rao in forum .NET
Replies: 6
Last Post: 08-22-2002, 04:26 AM
-
By Al Guten in forum .NET
Replies: 0
Last Post: 04-11-2002, 06:48 PM
-
By Judie in forum VB Classic
Replies: 0
Last Post: 03-23-2002, 02:55 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks