DLL Subform - De-activates NAV form

RickDDMS
RickDDMS Member Posts: 11
Hi,
I've wrote a .NET DLL which takes control of a NAV subform (similar to a tree view) to display NAV data graphically.
Its all working other than when i click within the .NET form the NAV form is de-activated.
I've used c# sharp and hooked the into the NAV window...
When the NAV form is active my tool tips work fine (tips within the .net form) but once you've clicked within the .NET form (and de-activated the NAV parent form) the tool tips won't work (until you re-activate the NAV form).
I've tried having my .NET form call an event in NAV to re-focus the NAV form but unless i pop a message up the focus doesn't return.

Does anyone have any ideas as to how you can keep the NAV form active, or stop a .NET form from receiving focus.

Thanks

Comments

  • freddy.dk
    freddy.dk Member, Microsoft Employee Posts: 360
    Is it RoleTailored or Classic?
    Can you share some code?
    What do you mean by "hook into the window"?
    Freddy Kristiansen
    Group Program Manager, Client
    Microsoft Dynamics NAV
    http://blogs.msdn.com/freddyk

    The information in this post is provided "AS IS" with no warranties, and confers no rights. This post does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.
  • RickDDMS
    RickDDMS Member Posts: 11
    Its the classic client i'm using and a native database.

    I'm retreiving the handle of the NAV subform and setting it as the parent of my .NET form using ..(part of the code)
    public static extern IntPtr SetParent(IntPtr hWndChild, IntPtr hWndParent);
    [DllImport("User32", CharSet = CharSet.Auto, ExactSpelling = true)]


    Rick