home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic 6 Unleashed…sional Reference Edition) / Visual_Basic_6_Unleashed_Professional_Reference_Edition_Sams_1999.iso / Source / CHAP05 / 309X0516.TXT < prev    next >
Encoding:
Text File  |  1998-05-27  |  2.3 KB  |  89 lines

  1.  
  2. Private Sub UserControl_Click()
  3.  
  4.      ' If UserControl's Click event is triggered,
  5.      ' LightButton's Click event is in turn raised.
  6.      RaiseEvent Click
  7.  
  8. End Sub
  9.  
  10.  
  11. Private Sub UserControl_DblClick()
  12.  
  13.      ' If UserControl's DblClick event is triggered,
  14.      ' LightButton's DblClick event is in turn raised.
  15.      RaiseEvent DblClick
  16.  
  17. End Sub
  18.  
  19.  
  20. Private Sub UserControl_KeyDown(KeyCode As Integer, _
  21.      Shift As Integer)
  22.  
  23.      ' If UserControl's KeyDown event is triggered,
  24.      ' LightButton's KeyDown event is in turn raised,
  25.      ' and the KeyCode and Shift arguments are passed
  26.      ' to that event.
  27.      RaiseEvent KeyDown(KeyCode, Shift)
  28.  
  29. End Sub
  30.  
  31.  
  32. Private Sub UserControl_KeyPress(KeyAscii As Integer)
  33.  
  34.      ' If UserControl's KeyPress event is triggered,
  35.      ' LightButton's KeyPress event is in turn raised,
  36.      ' and the KeyAscii argument is passed to that
  37.      ' event.
  38.      RaiseEvent KeyPress(KeyAscii)
  39.  
  40. End Sub
  41.  
  42.  
  43. Private Sub UserControl_KeyUp(KeyCode As Integer, _
  44.      Shift As Integer)
  45.  
  46.      ' If UserControl's KeyUp event is triggered,
  47.      ' LightButton's KeyUp event is in turn raised,
  48.      ' and the KeyCode and Shift arguments are
  49.      ' passed to that event.
  50.      RaiseEvent KeyUp(KeyCode, Shift)
  51.  
  52. End Sub
  53.  
  54.  
  55. Private Sub UserControl_MouseDown(Button As Integer, _
  56.      Shift As Integer, X As Single, Y As Single)
  57.  
  58.      ' If UserControl's MouseDown event is triggered,
  59.      ' LightButton's MouseDown event is in turn raised,
  60.      ' and the Button, Shift, X and Y arguments are
  61.      ' passed to that event.
  62.      RaiseEvent MouseDown(Button, Shift, X, Y)
  63.  
  64. End Sub
  65.  
  66.  
  67. Private Sub UserControl_MouseMove(Button As Integer, _
  68.      Shift As Integer, X As Single, Y As Single)
  69.  
  70.      ' If UserControl's MouseMove event is triggered,
  71.      ' LightButton's MouseMove event is in turn raised,
  72.      ' and the Button, Shift, X and Y arguments are
  73.      ' passed to that event.
  74.      RaiseEvent MouseMove(Button, Shift, X, Y)
  75.  
  76. End Sub
  77.  
  78.  
  79. Private Sub UserControl_MouseUp(Button As Integer, _
  80.      Shift As Integer, X As Single, Y As Single)
  81.  
  82.      ' If UserControl's MouseUp event is triggered,
  83.      ' LightButton's MouseUp event is in turn raised,
  84.      ' and the Button, Shift, X and Y arguments are
  85.      ' passed to that event.
  86.      RaiseEvent MouseUp(Button, Shift, X, Y)
  87.  
  88. End Sub
  89.