Opening a new form from a TreeView

DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Opening a new form from a TreeView

  1. #1
    Join Date
    Apr 2006

    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);

    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?

  2. #2
    Join Date
    Apr 2006
    Found the answer to this issue on MSDN forums:

    The key is to use the MouseMove event, since it fires last.
    Hope this helps anyone with a similar issue!


Similar Threads

  1. Opening a blank Infopath form from ASP.NET
    By vikramjparekh in forum ASP.NET
    Replies: 2
    Last Post: 07-24-2005, 10:21 PM
  2. opening a form by date
    By MacataQ in forum VB Classic
    Replies: 4
    Last Post: 07-05-2005, 12:00 PM
  3. Opening Form
    By Sayana Srinivasa Rao in forum .NET
    Replies: 6
    Last Post: 08-22-2002, 04:26 AM
  4. Replies: 0
    Last Post: 04-11-2002, 06:48 PM
  5. 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
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center