home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic .NET - Read Less - Learn More / Visual_Basic.NET_Read_Less_Learn_More_Richard_Bowman_Visual_2002.iso / Resources / Code / Ch12-CreateAComponent / MyComponent.vb < prev   
Text File  |  2001-09-03  |  1KB  |  48 lines

  1. Public Class MyComponent
  2.     Inherits System.ComponentModel.Component
  3. #Region " Component Designer generated code "
  4.  
  5.     Public Sub New(ByVal Container As System.ComponentModel.IContainer)
  6.         MyClass.New()
  7.  
  8.         'Required for Windows.Forms Class Composition Designer support
  9.         Container.Add(Me)
  10.     End Sub
  11.  
  12.     Public Sub New()
  13.         MyBase.New()
  14.  
  15.         'This call is required by the Component Designer.
  16.         InitializeComponent()
  17.  
  18.         'Add any initialization after the InitializeComponent() call
  19.  
  20.     End Sub
  21.  
  22.     'Required by the Component Designer
  23.     Private components As System.ComponentModel.Container
  24.  
  25.     'NOTE: The following procedure is required by the Component Designer
  26.     'It can be modified using the Component Designer.
  27.     'Do not modify it using the code editor.
  28.     <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
  29.         components = New System.ComponentModel.Container()
  30.     End Sub
  31.  
  32. #End Region
  33.     Private mText As String
  34.  
  35.     Public Property Text() As String
  36.         Get
  37.             Return mText
  38.         End Get
  39.         Set(ByVal Value As String)
  40.             mText = Value
  41.         End Set
  42.     End Property
  43.  
  44.     Public Function ManipulateText() As String
  45.         Return mText.Substring(2)
  46.     End Function
  47. End Class
  48.