Note that there are some explanatory texts on larger screens.

plurals
  1. POhow to use/extract identity of a control inside an activex control
    primarykey
    data
    text
    <p>I have yet another problem..</p> <p>Consider looking at <a href="https://stackoverflow.com/questions/20236430/move-winform-in-relation-to-a-button-from-another-form-vb-c"><strong>THIS</strong></a> first..</p> <p>on my early problems, I needed to drag a button, and a form in relation to how I drag/move the pictureBox.. All controls are inside .NET</p> <p>Now I am working on this great <a href="https://greatmaps.codeplex.com/" rel="nofollow noreferrer"><strong>Control, GMaps</strong></a> in which adapts the google's API in .NET framework.<br> My goal is to create something like the infoWindow on google's API. so I resorted on customizing it by creating a new form (acting as the infoWindow) on the first link above. If you've seen Gmaps.net, it really is a map. Draggable, pan to zoom, can add markers/polygons.. one thing that it lacks is its documentation + the infoWindow tool that I want with the marker..<br> it only has its "tooltip" that can only have string in it.<br> e.g <code>marker.ToolTipText="Blah Blah"</code><br> on codeplex' discussions, it is said that you must create your <strong>own</strong> tooltip for it not to only display a string. but I can't find a good example except <a href="https://greatmaps.codeplex.com/discussions/284459" rel="nofollow noreferrer"><strong>THIS</strong></a> in which inherits a <strong>contextMenu</strong> which I cannot particularly use because whenever I click again, it disappears.</p> <p>back to my question, if you've checked the first link above, you'll know what I want to achieve, the only problem now is, I can't use this code as it is :</p> <pre><code>Point p = Button1.PointToScreen(Point.Empty); p.Offset(0, (-1 * Form2.Height) - 15); Form2.Location = p; </code></pre> <p>this code makes <code>Form2</code> follow <code>Button1</code> wherever it goes.. Unfortunately, on my gMap control, there is no button. there is only the marker inside.<br> <strong>Remember : this map is a control</strong><img src="https://i.stack.imgur.com/p2FiK.jpg" alt="enter image description here"></p> <p>so, how can I use the marker as a parent of the form, so if I try to drag the map, it follows.. something like this :</p> <pre><code>Point p = marker.PointToScreen(Point.Empty); p.Offset(0, (-1 * Form2.Height) - 15); Form2.Location = p; </code></pre> <p><strong>UPDATE</strong> I used this code, no errors, does not work..</p> <pre><code> void mainMap_MouseDown(object sender, MouseEventArgs e) { Point p = (marker.LocalPosition = PointToScreen(Point.Empty)); //Point p = button1.PointToScreen(Point.Empty); --&gt; this gives the error that it cannot be converted p.Offset(0, (-1 * f2.Height) - 15); f2.Location = p; } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload