custom controls
-
Hi. I have a general question about custom controls. I want to make a control on a windows form that has a nonrectangular shape and the control itself is divided into several nonrectangular shapes. I need to divide the control because i want the different areas in it to have different properties. I'd be very grateful if someone gives me a general advice on how to achieve that. I've already tried with transparent labels over a picture representing the control, but it is not nearly as good as i need it to be. Thank you in advance.
-
Hi. I have a general question about custom controls. I want to make a control on a windows form that has a nonrectangular shape and the control itself is divided into several nonrectangular shapes. I need to divide the control because i want the different areas in it to have different properties. I'd be very grateful if someone gives me a general advice on how to achieve that. I've already tried with transparent labels over a picture representing the control, but it is not nearly as good as i need it to be. Thank you in advance.
A possible cheat/workaround... Depending on how graphic you want your controls to be here's an idea (untested - something I've thought of doing but never got around to). 1. Draw your custom control in Flash (I choose Flash coz it's simple and powerful), 2. Add a Shockwave Flash object to your toolbox. 3. Create a new custom control, adding the Flash object to it. 4. Give the control applicable events like onClick, onMouseEnter/Leave, etc. 5. Use GDI+ to cut out the unwanted square bits around your control (using GDI+ available here[^]). 6. Build and test. As mentioned earlier, I have yet to try this myself so I'm not completely sure that it'll work tho I don't see why it shouldn't given a little elbow grease. The choice of doing it this way is yours, you take my advice at your own peril :) Good luck, if you get it to work please let me know - i'd be very interested to see.
-
A possible cheat/workaround... Depending on how graphic you want your controls to be here's an idea (untested - something I've thought of doing but never got around to). 1. Draw your custom control in Flash (I choose Flash coz it's simple and powerful), 2. Add a Shockwave Flash object to your toolbox. 3. Create a new custom control, adding the Flash object to it. 4. Give the control applicable events like onClick, onMouseEnter/Leave, etc. 5. Use GDI+ to cut out the unwanted square bits around your control (using GDI+ available here[^]). 6. Build and test. As mentioned earlier, I have yet to try this myself so I'm not completely sure that it'll work tho I don't see why it shouldn't given a little elbow grease. The choice of doing it this way is yours, you take my advice at your own peril :) Good luck, if you get it to work please let me know - i'd be very interested to see.
Thank you for the reply. I am not used to using any of the macromedia products but here's a good reason to try them out :-) As soon as I finish the control i will write you back. Thanks once again.