views:

143

answers:

1

I've searched for two days trying to find a solution to this. My problem in which I need to solve is this:

I have a WinForms Application written in C#. It's designed pretty much how I want it to be with two columns (SplitContainer - setup like Windows Explorer, sidebar, et al). The non-sidebar panel will be setup with an image of our computer lab. However, the way I implement I haven't fully decided on yet.

  1. Buttons for each computer I would basically position buttons at each computer station on the background image. These buttons would need to remain in a relative location to the background image. I have somewhat achieved this using button anchors to Left and Right sides. However, this resizes the buttons' widths with the form being maximized.

  2. Flash Image I've explored some of SharpFlash over at sourceforge as an idea to use on my application. Basically, the flash object would be a COM object on the form and I would communicate back and forth with button clicks/etc to the flash object back to C#. However, I don't know Flash to even design it, nor do I really feel the need to learn the SharpFlash API when this is the only project I'd see myself using it on.

  3. PNG Meta An original idea I had was to embed meta data in the raw image itself in the form of named regions, however, a searching google renders this idea nearly impossible as I can't find anyone who's done it before. I've found some examples on how to interact with C# and get meta data, but not exactly how to embed it. A friend mentioned that I would need to use Adobe Bridge (I think).

  4. Highlight regions of image I would like to be able to highlight the computer to indicate to the user that this computer is selected currently so they don't have to really guess which one is selected (even though it says via C# label which one is selected; the end-users are visual-people)

I'm open for some possiblities too if someone has a better solution.

+1  A: 

As far as your anchoring, if you anchor only the top, the buttons will remain relative meaning if you group them in the center of the form, if its resized they will stay in the center without resizing the buttons. I think your easiest way to highlight the image is to have 2 images. One image that is the "Normal" non used pc, and another image that is the "In-Use" image for the button. Then you can change the image on the fly using the ImageIndex property. You would need an ImageList of course for this to work.

Gary L Cox Jr