<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Confused about adding a tool to a form in an Add-in in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/confused-about-adding-a-tool-to-a-form-in-an-add/m-p/309285#M8072</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I have a UICommand in my add-in which displays the form and all that works great. What I want to add to do is add a button to that form which is used to click on the map, get x,y coordinates, and then populate them back into a textbox on the windows form&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't think the "add-in" environment will allow you to place Tools wherever you want.&amp;nbsp; Although I haven't tried it, an add-in tool is just a class that extends Tool, so I guess you could create an instance of a Tool, but I don't know if ArcMap does anthing else besides just calling your Tool for you when it is located on an existing toolbar.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A Tool interacts with the map, in the sense of being able to click in the map and get information.&amp;nbsp; You *could* design the application so that when the user clicks on a tool, the tool would get the click point on the map, then launch the form, thereby populating the form with that click point information.&amp;nbsp; This is similar to how the "Identify" tool already works.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I think about how an edit session works, I start by clicking on a tool and then doing something in the map, then doing something in a (attribute) form window.&amp;nbsp; Sure, it looks like you are launching a tool from a dockable window, when you click a construction tool template, but those aren't add-ins.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Mar 2012 19:55:24 GMT</pubDate>
    <dc:creator>LeoDonahue</dc:creator>
    <dc:date>2012-03-27T19:55:24Z</dc:date>
    <item>
      <title>Confused about adding a tool to a form in an Add-in</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/confused-about-adding-a-tool-to-a-form-in-an-add/m-p/309283#M8070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have some experience already with add-ins, namely add-ins which are collections of very specific tools or buttons for use in Arcmap. For my current project, I'm developing an add-in which our staff can use to attribute and geotag JPEG photos taken while in the field. I have a windows form which has several text boxes for the user to input information. I have a UICommand in my add-in which displays the form and all that works great. What I want to add to do is add a button to that form which is used to click on the map, get x,y coordinates, and then populate them back into a textbox on the windows form.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is where I'm stuck and it seems to me like this is a gap in the documentation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How do I add a UITool to a windows form within my VB.NET project? Does the tool have to be already developed (or compiled) or can I have it in my current project?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'd really like to keep it as a windows form instead of a dockable window since I'm using the form to display JPEGs in a sort of slideshow presentation. Funny thing is, I thought the EXIF updating would be the hardest part but I've now got that working. I just need this tiny bit!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As I eluded to, I'm using Visual Studio Express 2008 VB.NET as my development environment and version10 for ArcGIS.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Steve&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Mar 2012 18:24:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/confused-about-adding-a-tool-to-a-form-in-an-add/m-p/309283#M8070</guid>
      <dc:creator>SteveCole</dc:creator>
      <dc:date>2012-03-27T18:24:43Z</dc:date>
    </item>
    <item>
      <title>Re: Confused about adding a tool to a form in an Add-in</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/confused-about-adding-a-tool-to-a-form-in-an-add/m-p/309284#M8071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Think I'm on the right path. I hate it when I search the forum, find nothing, post a question, and THEN find something useful in a forum search!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyways, Neil Clemmons provided a rough guide in this thread:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/50996-Create-Point-on-screen-Trigger-mousedown-via-form?highlight=add+tool+form"&gt;http://forums.arcgis.com/threads/50996-Create-Point-on-screen-Trigger-mousedown-via-form?highlight=add+tool+form&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And this thread gives you the code to "activate" your add-in tool:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/31897-Activate-Add-In-Tool?highlight=add+tool+form"&gt;http://forums.arcgis.com/threads/31897-Activate-Add-In-Tool?highlight=add+tool+form&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Be sure that your add-in has been compiled or the tool won't appear in the list returned by My.ThisAddIn.IDs. So far the tool activates and the mouse click on the map returns coordinates so I'm most of the way there!..&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Mar 2012 19:32:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/confused-about-adding-a-tool-to-a-form-in-an-add/m-p/309284#M8071</guid>
      <dc:creator>SteveCole</dc:creator>
      <dc:date>2012-03-27T19:32:32Z</dc:date>
    </item>
    <item>
      <title>Re: Confused about adding a tool to a form in an Add-in</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/confused-about-adding-a-tool-to-a-form-in-an-add/m-p/309285#M8072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I have a UICommand in my add-in which displays the form and all that works great. What I want to add to do is add a button to that form which is used to click on the map, get x,y coordinates, and then populate them back into a textbox on the windows form&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't think the "add-in" environment will allow you to place Tools wherever you want.&amp;nbsp; Although I haven't tried it, an add-in tool is just a class that extends Tool, so I guess you could create an instance of a Tool, but I don't know if ArcMap does anthing else besides just calling your Tool for you when it is located on an existing toolbar.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A Tool interacts with the map, in the sense of being able to click in the map and get information.&amp;nbsp; You *could* design the application so that when the user clicks on a tool, the tool would get the click point on the map, then launch the form, thereby populating the form with that click point information.&amp;nbsp; This is similar to how the "Identify" tool already works.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I think about how an edit session works, I start by clicking on a tool and then doing something in the map, then doing something in a (attribute) form window.&amp;nbsp; Sure, it looks like you are launching a tool from a dockable window, when you click a construction tool template, but those aren't add-ins.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Mar 2012 19:55:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/confused-about-adding-a-tool-to-a-form-in-an-add/m-p/309285#M8072</guid>
      <dc:creator>LeoDonahue</dc:creator>
      <dc:date>2012-03-27T19:55:24Z</dc:date>
    </item>
    <item>
      <title>Re: Confused about adding a tool to a form in an Add-in</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/confused-about-adding-a-tool-to-a-form-in-an-add/m-p/309286#M8073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Leo,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't know if it's supposed to or not, but I can tell you that it *IS* working! It might be a bit of trickery since the "tool" button on the form is really just a simple form button. As the first link suggests, the click event for the form button really just changes the active tool to my custom UITool. Inside the OnMouseDown event for the UITool, I get my coordinates and then transfer the values back to my form in this manner-&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Dim theForm As frmPhotoDlg 'My custom form's class name
theForm = System.Windows.Forms.Application.OpenForms(0)
theForm.txtLatitude.Text = pPoint.Y
theForm.txtLongitude.Text = pPoint.X
&lt;/PRE&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So far, it all works just fine. I should point out that for the time being, I'm not editing any data. I'm merely using Arcmap to draw our data and to extract the geolocation information. The Arcmap related portion of my current add-in is only about 5%. I may expand things to include writing records into a database table in the future. Not really sure which direction this tool will be heading.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's also a screenshot of Arcmap plus the open form from my Add-in..&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]13054[/ATTACH]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:47:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/confused-about-adding-a-tool-to-a-form-in-an-add/m-p/309286#M8073</guid>
      <dc:creator>SteveCole</dc:creator>
      <dc:date>2021-12-11T14:47:42Z</dc:date>
    </item>
    <item>
      <title>Re: Confused about adding a tool to a form in an Add-in</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/confused-about-adding-a-tool-to-a-form-in-an-add/m-p/309287#M8074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
Dim theForm As frmPhotoDlg 'My custom form's class name
theForm = System.Windows.Forms.Application.OpenForms(0)
&lt;/PRE&gt; &lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So do you now have two variables that can manipulate your Form?&amp;nbsp; "theForm" and whatever other variable you used to show the form?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:47:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/confused-about-adding-a-tool-to-a-form-in-an-add/m-p/309287#M8074</guid>
      <dc:creator>LeoDonahue</dc:creator>
      <dc:date>2021-12-11T14:47:45Z</dc:date>
    </item>
    <item>
      <title>Re: Confused about adding a tool to a form in an Add-in</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/confused-about-adding-a-tool-to-a-form-in-an-add/m-p/309288#M8075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm not exactly sure what you're asking. I think I only have the one (theForm). I'm still a bit green with VB.NET to answer authoritatively!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The code snippit I had provided all comes from the same Sub procedure (OnMouseDown for my Add-in component). The full sub code would be this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Protected Overrides Sub OnMouseDown(ByVal arg As ESRI.ArcGIS.Desktop.AddIns.Tool.MouseEventArgs)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MyBase.OnMouseDown(arg)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim application As ESRI.ArcGIS.Framework.IApplication
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pMxDoc As ESRI.ArcGIS.ArcMapUI.IMxDocument
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pPoint As ESRI.ArcGIS.Geometry.IPoint
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pClone As ESRI.ArcGIS.esriSystem.IClone
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pGeometry As ESRI.ArcGIS.Geometry.IGeometry
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pSpatialRefFactory As ESRI.ArcGIS.Geometry.ISpatialReferenceFactory
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pSpatialRef As ESRI.ArcGIS.Geometry.ISpatialReference
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pGeographicCoordSys As ESRI.ArcGIS.Geometry.IGeographicCoordinateSystem
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pProjectedCoordSys As ESRI.ArcGIS.Geometry.IProjectedCoordinateSystem
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim theForm As frmPhotoDlg
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim theResults As String

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Try
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Get the point where the user clicked
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; application = My.ArcMap.Application
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim document As ESRI.ArcGIS.Framework.IDocument = application.Document
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pMxDoc = CType(document, ESRI.ArcGIS.ArcMapUI.IMxDocument)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If pMxDoc.CurrentLocation.IsEmpty Then Exit Sub
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Clone the point because we don't want to alter
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'the actual document's current location point
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pClone = pMxDoc.CurrentLocation
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pPoint = pClone.Clone
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pGeometry = pPoint

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Create a new geographic coordinate system to use in the conversion
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pSpatialRefFactory = New ESRI.ArcGIS.Geometry.SpatialReferenceEnvironment
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pGeographicCoordSys = pSpatialRefFactory.CreateGeographicCoordinateSystem(ESRI.ArcGIS.Geometry.esriSRGeoCSType.esriSRGeoCS_NAD1983)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pSpatialRef = pGeographicCoordSys 'QI
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pSpatialRef.SetFalseOriginAndUnits(-180, -90, 1000000)

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pGeometry.Project(pSpatialRef)

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim theDegrees As Double
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim theMinutes As Double
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim theSeconds As Double

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim longDms As String
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim latDms As String
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim longDD As Double
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim latDD As Double

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; longDD = Math.Abs(pPoint.X)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; latDD = pPoint.Y

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; theDegrees = Int(longDD)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; theMinutes = (longDD - theDegrees) * 60
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; theSeconds = Int((theMinutes - Int(theMinutes)) * 60)

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; longDms = theDegrees &amp;amp; "° " &amp;amp; Int(theMinutes) &amp;amp; "' " &amp;amp; theSeconds &amp;amp; Chr(34)

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; theDegrees = Int(latDD)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; theMinutes = (latDD - theDegrees) * 60
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; theSeconds = Int((theMinutes - Int(theMinutes)) * 60)

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; latDms = theDegrees &amp;amp; "° " &amp;amp; Int(theMinutes) &amp;amp; "' " &amp;amp; theSeconds &amp;amp; Chr(34)

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; theResults = "DECIMAL DEGREES:" &amp;amp; vbNewLine &amp;amp; vbNewLine &amp;amp; vbTab &amp;amp; "Latitude: " &amp;amp; pPoint.Y &amp;amp; vbNewLine
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; theResults = theResults &amp;amp; vbTab &amp;amp; "Longitude: " &amp;amp; pPoint.X &amp;amp; vbNewLine &amp;amp; vbNewLine &amp;amp; "DEGREES/MINUTES/SECONDS:"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; theResults = theResults &amp;amp; vbNewLine &amp;amp; vbNewLine &amp;amp; vbTab &amp;amp; "Latitude: " &amp;amp; latDms &amp;amp; vbNewLine &amp;amp; vbTab &amp;amp; "Longitude: " &amp;amp; longDms

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'My.Computer.Clipboard.SetText(theResults)

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; theForm = System.Windows.Forms.Application.OpenForms(0)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; theForm.txtLatitude.Text = pPoint.Y
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; theForm.txtLongitude.Text = pPoint.X

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'MsgBox(theResults, vbInformation, "Geographic Results")

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pSpatialRefFactory = Nothing
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pGeographicCoordSys = Nothing
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pProjectedCoordSys = Nothing
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pSpatialRef = Nothing
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pClone = Nothing
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pPoint = Nothing
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pGeometry = Nothing
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pMxDoc = Nothing
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; application = Nothing
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; document = Nothing
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Catch ex As Exception
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; globalErrorHandler(ex)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Try
&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:47:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/confused-about-adding-a-tool-to-a-form-in-an-add/m-p/309288#M8075</guid>
      <dc:creator>SteveCole</dc:creator>
      <dc:date>2021-12-11T14:47:48Z</dc:date>
    </item>
    <item>
      <title>Re: Confused about adding a tool to a form in an Add-in</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/confused-about-adding-a-tool-to-a-form-in-an-add/m-p/309289#M8076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I'm still a bit green with VB.NET...&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;May I suggest the StringBuilder class for you then?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://support.microsoft.com/kb/306821"&gt;http://support.microsoft.com/kb/306821&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Mar 2012 21:37:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/confused-about-adding-a-tool-to-a-form-in-an-add/m-p/309289#M8076</guid>
      <dc:creator>LeoDonahue</dc:creator>
      <dc:date>2012-03-27T21:37:44Z</dc:date>
    </item>
  </channel>
</rss>

