May 2006 - Posts - Pann's Thoughts

May 2006 - Posts

I want to derive some control of the base .net WinForm controls (e.g. TextBox) in order to set the look&feel of the control once, and then reuse this derived control throughout my application. This way, if I want to change, lets say, the colour, I only need to go to the derived control, change the colour and all the textboxes should have the new colour. (Unless the forms themselves specify a different colour)

That's the theory.

In practice I'm struggling to make this work (in VS2005).

If I drag this control onto the form once, everything works fine and according to theory.

However, as soon as I drag the control onto the form a second time, somehow the form detects the color of the control and hardcodes it into the form designer code. The effect of this is that if I then go and change the derived control's colour, it is not reflected in the form when I run the application.

A workaround is to use composition instead of inheritance but that is more work.

Can anyone shed some light on the subject?

Posted by roaan | 1 comment(s)

I want to derive some control of the base .net WinForm controls (e.g. TextBox) in order to set the look&feel of the control once, and then reuse this derived control throughout my application. This way, if I want to change, lets say, the colour, I only need to go to the derived control, change the colour and all the textboxes should have the new colour. (Unless the forms themselves specify a different colour)

That's the theory.

In practice I'm struggling to make this work (in VS2005).

If I drag this control onto the form once, everything works fine and according to theory.

However, as soon as I drag the control onto the form a second time, somehow the form detects the color of the control and hardcodes it into the form designer code. The effect of this is that if I then go and change the derived control's colour, it is not reflected in the form when I run the application.

A workaround is to use composition instead of inheritance but that is more work.

Can anyone shed some light on the subject?

Posted by roaan

Does anyone know how to use the new (VS2005) MSDN ?

Or more specifically how to search for content that contain two or more words (not phrases).

I tried doing a search by specifying the two words, but then it does an "OR" search.

Can anyone help on how to do an "AND" search ?

PS. Can anyone point me to info on setting up Infragistics UltraTree with recursive custom object (i.e. not datatables)

Posted by roaan | 1 comment(s)

A collegue of mine introduced me to Charles. It's an HTTP proxy that intercepts your web requests. Using this, you can inspect the requests a web site makes as well as the responses it receives. Not only does it show you the content of the HTTP requests/responses, but also the time the request/response took as well as the size of the response. But that's not all....if you phone now...(I digress) it also has throttling capability built in. This allows you to emulate a modem or various other connection lines.

We found it very usefull to determine the usability of our website and using it was definately an eye opener.

Very Cool :D

Posted by roaan