Manipulating Images on a form or panel

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Rob

    #1

    Manipulating Images on a form or panel

    I've created an application which is intended to allow users to draw a
    diagram of a network - with workstations, servers, switches, links (all
    devices in my language) etc. I've created a user control made up of a
    picturebox and a textbox (to allow the user to enter a name). When a user
    wants to add a 'device' to the background surface (in my case a panel
    control)
    I create an instance of the user control setting the image of the picturebox
    to the type of device and add it to the controls for that panel. I've got all
    the line drawing/drag&drop/properties stuff working but is this approach -
    the use of a picturebox - the best implementation. I'm got minor issues in
    that a line between the devices disappear behind the user control/picturebox
    - I've tried to make the user control and picture box transparent with mixed
    results when run on different machines.

    Can I 'just' add an image to the panel and access the events I'm after
    (mouse events primarily) by using 'region' processing (which I haven't used
    before)?
    thanks
Working...