I'm needing to programmatically display a form at the upper left position of ArcMap the data view.
How do I get the X/Y position?
OK... I found some code that got me access to the Standard toolbar within ArcMap. Just a little modifications to obtain the starting location of the toolbar which I can use anchor my form until it's closed.
'
' --- Get coordinates of the upper left corner of the Standard Bar (location)
' This will be used to position the Move Post form
Dim documentBars As ICommandBars = gApplication.Document.CommandBars 'app is a reference to IApplication
Dim barID As UID = New UIDClass
barID.Value = "{5DEB1DB8-C2A9-11D1-B9A2-080009EE4E51}"
Dim bar As ICommandItem = documentBars.Find(barID)
Dim windowPos As IWindowPosition = CType(bar, IWindowPosition)
'If windowPos.State = esriWindowState.esriWSFloating Then
' MsgBox("Standard toolbar is floating.")
'Else
' MsgBox("Standard toolbar is docked.")
'End If
' --- Call create Move Post form
gfrmMovePost = New MovePost
' --- Change the location of the form
gfrmMovePost.Top = windowPos.Top
gfrmMovePost.Left = windowPos.Left
' --- Call form and display it
gfrmMovePost.Show()
Thanks Dan, I will take that under consideration on future postings.
https://community.esri.com/community/developers/gis-developers/arcobjects-sdk?sr=search&searchId=69fcc597-3a8f-43cd-ae6d-64d6ea6c2b24&searchIndex=0 might be a good place to move your thread too... generic gis is probably going to of little help for you especially given the legacy/older version of arcmap
I'm working with ArcGIS 10.2.2 version and ArcObjects. I haven't used Python at all.
examine the properties and the code examples in the dataframe section in arcpy
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.