c# - Dynamically generated controls issue -


I have a form with a docked panel in it, then I dynamically designated 15 panels named on the primary panel (named: Panel_n) and 15 pictureboxes (nominated: picturebox_n) (named ContainerPanel).

Any time the panel draws any picture box (panel_n) mouse events, I would like to get the name of the panel on which the picture box was drawn. Capturing mouse cursor.

I have tried to create an IMSsfilter interface, but there is still no incident that triggers when drawing an image box on any panel.

Clientrectengel Intrinsects are also not working because co-orders are always 0,0.

I have only one panel name where the picture box was dragged (preferably on a mouseup event)

If you give an image slideshow to an onmassdown event that says something like this:

  (Sender in the form of a picture box). Dodradrope (Sender, Draft Effects. COPY);  

Then you can allow the panel to set the dop property to the correct, and in their Ondragdorp event, you can get their name in such a way:

  string myName = (sender as panel) .name;  Edit:  In addition, you must give panels an OnDragEnter event like this:  
  e.ffect = DragDropEffects Copy;  

Of course, you can change from copy to or link or whatever is appropriate for you Again, it just changes the mouse pointer icon that is used.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -