Custom Cotnrols and Windows Controls Usage
-
AoA Thanks in advance for help. I have made user controls of all default windows controls e.g. buttons, text box etc. So i make some skinning capability in it and some functionality enhancements. So now i have a problem. I have an application developed earlier which usage all default windows controls. I want that i place a single component on each form and it replaces the default controls with my controls run time. Mostly i used paint in my controls. All my work is in C# and VS2005. Please some body help me. And thanks in advance.
-
AoA Thanks in advance for help. I have made user controls of all default windows controls e.g. buttons, text box etc. So i make some skinning capability in it and some functionality enhancements. So now i have a problem. I have an application developed earlier which usage all default windows controls. I want that i place a single component on each form and it replaces the default controls with my controls run time. Mostly i used paint in my controls. All my work is in C# and VS2005. Please some body help me. And thanks in advance.
That is quite a large undertaking. One in which it would be easier if you just rewrote the application. Basically, you have to go through the controls on the form and wire up new Paint event handlers from every control type. You'd have to supply painting code for every control your app uses, CheckBox's, TextBox's, Button's, ...
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
That is quite a large undertaking. One in which it would be easier if you just rewrote the application. Basically, you have to go through the controls on the form and wire up new Paint event handlers from every control type. You'd have to supply painting code for every control your app uses, CheckBox's, TextBox's, Button's, ...
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008AoA Thanks a lot. It helps me to understand how to implement my situation. I will check it, if it would be done. In market there are many skinning frameworks e.g. SkinCrafter. we put a control on the form and supply it a skin, and all forms from that application is skinned automatically. Can you guide me of that process. Or suggest me of any tutorial or book which helps me to do so. Thanks for previous answer and thanks helping me in further in advance.
-
AoA Thanks a lot. It helps me to understand how to implement my situation. I will check it, if it would be done. In market there are many skinning frameworks e.g. SkinCrafter. we put a control on the form and supply it a skin, and all forms from that application is skinned automatically. Can you guide me of that process. Or suggest me of any tutorial or book which helps me to do so. Thanks for previous answer and thanks helping me in further in advance.
NazarHussain wrote:
Can you guide me of that process.
I just told you how it worked. You go enumerate the form's Controls collection, check the type of control and, depending on the type, use AddHandler to wire up it's Paint event to your own custom paint code.
NazarHussain wrote:
Or suggest me of any tutorial or book which helps me to do so.
I don't of any skinning tutorials, at least none that show you how to write your own component. Using a third party component, I've seen. Though, see what you can gleen from this[^]. It's not a good article because it doesn't explain anything about the code or concepts. But, if you can read the code, you might get something out of it.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
NazarHussain wrote:
Can you guide me of that process.
I just told you how it worked. You go enumerate the form's Controls collection, check the type of control and, depending on the type, use AddHandler to wire up it's Paint event to your own custom paint code.
NazarHussain wrote:
Or suggest me of any tutorial or book which helps me to do so.
I don't of any skinning tutorials, at least none that show you how to write your own component. Using a third party component, I've seen. Though, see what you can gleen from this[^]. It's not a good article because it doesn't explain anything about the code or concepts. But, if you can read the code, you might get something out of it.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008Thanks it was a good tutorial. As i done some good thing in this concern i will post it on codeproject. Thanks again.