Adding Attributes to Control instances
-
Hello all! i want to add my custom attribute to a Control member of a form. For exmaple there is the following code line: _ Public WithEvents grdTest as DataGridView Now, at runtime, i want to read the the information of the MyAttribute instance of the grdTest-Control but when i call GetCustomAttributes of the PropertyInfo of the grdTest control instance the resulting array has zero elements ... it seems, that the changes i made in the TestForm.Designer.vb are not compiled ... has anyone any idea? :) greets testy
solidIT.de - under construction Components for Microsoft .Net audittrail, objectcomparer, deepcopy and much more ...
-
Hello all! i want to add my custom attribute to a Control member of a form. For exmaple there is the following code line: _ Public WithEvents grdTest as DataGridView Now, at runtime, i want to read the the information of the MyAttribute instance of the grdTest-Control but when i call GetCustomAttributes of the PropertyInfo of the grdTest control instance the resulting array has zero elements ... it seems, that the changes i made in the TestForm.Designer.vb are not compiled ... has anyone any idea? :) greets testy
solidIT.de - under construction Components for Microsoft .Net audittrail, objectcomparer, deepcopy and much more ...
Do attributes use < and > in VB, instead of [] ? BTW, check 'Ignore HTML tags' for those to show up in your post.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
-
Do attributes use < and > in VB, instead of [] ? BTW, check 'Ignore HTML tags' for those to show up in your post.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
argh!!! :) thank you.... hmm ... yes: in VB you must use "<" and ">" and if you want to write it in multiple lines (like in C#) ... you must write an underscore... that is very "un-handy" (??) _ _ Public Sub Test() End Sub the code line looks like: Public WithEvents grdTest as DataGridView solidIT.de - under construction Components for Microsoft .Net audittrail, objectcomparer, deepcopy and much more ... -- modified at 10:47 Tuesday 27th March, 2007