Search the Community
Showing results for tags 'custom'.
-
Hi everybody. I was wondering if any one had encoutered the need to create a custom .net attribute that acts like ObsoleteAttribute ? So lets suppose that this attribut is coded and is called MySpecialAttribute and lets say that its targeted for Methods only. What I need is that at the moment the coder will declare a sush attribute and while he is in IDE mode (visual studio only or other compiliant IDE) a special job is done with possible forced compiling error ? Example : <MySpecialAttribute()> _ Public Sub MyMethodToBeControled(ByVal Param1 As Object) ... End Sub In this case I want to check that arguments of the Sub MyMethodToBeControled meet some conditions (type or name) and if not raise a compiling error in the IDE like ObsoleteAttribut does. Any Idea from experts ?
-
Just a quick example of how it is possible to create a custom textbox control in VB.Net. It exposes a property to define allowed content via an enumeration, raises an event on invalid entry and also handles programatic assigment and attempts to paste invalid data also. Zip also includes a sample form showing the control in action (or lack of action) CustomControl.zip