|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Attributes questionProperty for Custom Control. I'm trying to add an Attribute to the Property this way: <Category("Alignment"), Description("Specifies the alignment of text.")> _ Public Property MyProperty() As String I copied the Attribute line from MSDN topic. VS highlights Category and Description and says "Type 'Category' is not defined". The same for Description. I tried to add Imports System Imports System.Attribute No success. What am I missing? What should I add and where in order to make the Attribute line work? Thank you Add this import too:
Imports System.ComponentModel Bryan Phillips MCSD, MCDBA, MCSE Blog: http://bphillips76.spaces.live.com Show quoteHide quote "Esha" <a**@optonline.net> wrote in message news:#uBpZ$J#GHA.3312@TK2MSFTNGP02.phx.gbl: > I'm learning Attribute stuff by reading MSDN topics. I'm creating a new > Property for Custom Control. I'm trying to add an Attribute to the Property > this way: > <Category("Alignment"), Description("Specifies the alignment of text.")> _ > > Public Property MyProperty() As String > > I copied the Attribute line from MSDN topic. > > VS highlights Category and Description and says "Type 'Category' is not > defined". The same for Description. > > I tried to add > > Imports System > > Imports System.Attribute > > No success. > > What am I missing? > > What should I add and where in order to make the Attribute line work? > > Thank you Thanks a lot Bryan
Show quoteHide quote "Bryan Phillips" <bphillips@nospam.crowechizek.com.spammenot> wrote in message news:%239epZrK%23GHA.1784@TK2MSFTNGP04.phx.gbl... > Add this import too: > > Imports System.ComponentModel > > Bryan Phillips > MCSD, MCDBA, MCSE > Blog: http://bphillips76.spaces.live.com > > > > > "Esha" <a**@optonline.net> wrote in message > news:#uBpZ$J#GHA.3312@TK2MSFTNGP02.phx.gbl: > >> I'm learning Attribute stuff by reading MSDN topics. I'm creating a new >> Property for Custom Control. I'm trying to add an Attribute to the >> Property >> this way: >> <Category("Alignment"), Description("Specifies the alignment of text.")> >> _ >> >> Public Property MyProperty() As String >> >> I copied the Attribute line from MSDN topic. >> >> VS highlights Category and Description and says "Type 'Category' is not >> defined". The same for Description. >> >> I tried to add >> >> Imports System >> >> Imports System.Attribute >> >> No success. >> >> What am I missing? >> >> What should I add and where in order to make the Attribute line work? >> >> Thank you >
Copying from one Database to another VB 2005
Poor performance IDE. Urgent suggestion needed. how to set the Application.ProductVersion resizing controls (webbrowser control) only for expert: what's wrong with this code? convert text to decimal How to capture Mouse clicks and Keystrokes in a VB app Security and file permissions.... Start up form Zip SharpZipLib examples for VB |
|||||||||||||||||||||||