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-AddAnEvent / UserControl1.vb < prev   
Text File  |  2001-09-03  |  1KB  |  53 lines

  1. Public Class UserControl1
  2.     Inherits System.Windows.Forms.UserControl
  3.  
  4. #Region " Windows Form Designer generated code "
  5.  
  6.     Public Sub New()
  7.         MyBase.New()
  8.  
  9.         'This call is required by the Windows Form Designer.
  10.         InitializeComponent()
  11.  
  12.         'Add any initialization after the InitializeComponent() call
  13.  
  14.     End Sub
  15.  
  16.     'UserControl1 overrides dispose to clean up the component list.
  17.     Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
  18.         If disposing Then
  19.             If Not (components Is Nothing) Then
  20.                 components.Dispose()
  21.             End If
  22.         End If
  23.         MyBase.Dispose(disposing)
  24.     End Sub
  25.  
  26.     'Required by the Windows Form Designer
  27.     Private components As System.ComponentModel.Container
  28.  
  29.     'NOTE: The following procedure is required by the Windows Form Designer
  30.     'It can be modified using the Windows Form Designer.  
  31.     'Do not modify it using the code editor.
  32.     <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
  33.         '
  34.         'UserControl1
  35.         '
  36.         Me.Name = "UserControl1"
  37.  
  38.     End Sub
  39.  
  40. #End Region
  41.  
  42.     Public Event MyEvent()
  43.  
  44.     Private Sub UserControl1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  45.  
  46.     End Sub
  47.  
  48.     Public Sub MyMethod()
  49.         RaiseEvent MyEvent()
  50.     End Sub
  51.  
  52. End Class
  53.