Winforms Controls
-
I am developing a project which features usercontrols like WinForms Controls. I have created controls like text box,picture,etc., Each control is a usercontrol and has its own properties.now the problem is when i select the usercontrol i have to get the rectangle that bounds the border of the control when you select a windows control. The user should know which control he/she has selected. Has anyone found a solution for this ? Thanks in advance:rose: Happy Coding MankayarKarasi
-
I am developing a project which features usercontrols like WinForms Controls. I have created controls like text box,picture,etc., Each control is a usercontrol and has its own properties.now the problem is when i select the usercontrol i have to get the rectangle that bounds the border of the control when you select a windows control. The user should know which control he/she has selected. Has anyone found a solution for this ? Thanks in advance:rose: Happy Coding MankayarKarasi
You are making your own controls for textbox, picture, etc? Sounds like you're doing a LOT of work when you don't need to be. Either way, a user control should have a Bounds variable, and you can make your own rectangle object with the information the Bounds variable contains. Mankayarkarasi wrote: The user should know which control he/she has selected. I don't understand what you mean here. Are you trying to highlight the controls, or are there overlapped controls where the selected one needs brought to the front? Explain this a little more. If you need extra functionality for the controls that already exist in C#, it would be a LOT easier for you to create new classes that inherit the old controls...then just add your new functionality. Hope I helped out at least a little. Good luck - D :cool:
-
You are making your own controls for textbox, picture, etc? Sounds like you're doing a LOT of work when you don't need to be. Either way, a user control should have a Bounds variable, and you can make your own rectangle object with the information the Bounds variable contains. Mankayarkarasi wrote: The user should know which control he/she has selected. I don't understand what you mean here. Are you trying to highlight the controls, or are there overlapped controls where the selected one needs brought to the front? Explain this a little more. If you need extra functionality for the controls that already exist in C#, it would be a LOT easier for you to create new classes that inherit the old controls...then just add your new functionality. Hope I helped out at least a little. Good luck - D :cool:
Thanks. The project I am working inherits few properties from Windows control. The User can create a report design of his own. so the controls will have the funcition similar to windows control. When you drag drop a control from Windows forms. A rubberband like highlight will be given to the control.This will be done easily in MFC using crectracker. In .NET I have dynamically calculated the corners for each control and with graphics has drawn rectangles to the edges. this provides a highlighted control. Happy Coding MankayarKarasi