form at front

1717
2
04-27-2016 11:02 AM
martinjabbour
New Contributor

Hi,

How can I keep a form in vb.net Arcobject in front of arcmap always ?

0 Kudos
2 Replies
FreddieGibson
Regular Contributor II

If the form is modal it should always appear on top. If the form is modeless you should be able to set the TopMost property to true, which should keep it on top.

How to: Keep a Windows Form on Top

0 Kudos
KenBuja
MVP Honored Contributor

You can also use this code when showing the form to set its owner as the ArcMap application

MyFormInstanceName.Show(System.Windows.Forms.Control.FromHandle(My.ArcMap.Application.hWnd))