home *** CD-ROM | disk | FTP | other *** search
/ Mastering Visual Basic 6 / mastvb6.iso / ch_code / ch16 / ctextbox / ctextbox.ctl (.txt) next >
Encoding:
Visual Basic Form  |  1998-07-08  |  19.2 KB  |  388 lines

  1. VERSION 5.00
  2. Begin VB.UserControl CTextBox 
  3.    ClientHeight    =   4170
  4.    ClientLeft      =   0
  5.    ClientTop       =   0
  6.    ClientWidth     =   6165
  7.    ScaleHeight     =   4170
  8.    ScaleWidth      =   6165
  9.    Begin VB.TextBox Text1 
  10.       Height          =   405
  11.       Left            =   120
  12.       TabIndex        =   0
  13.       Text            =   "ColorTextBox"
  14.       Top             =   165
  15.       Width           =   4410
  16.    End
  17. Attribute VB_Name = "CTextBox"
  18. Attribute VB_GlobalNameSpace = False
  19. Attribute VB_Creatable = True
  20. Attribute VB_PredeclaredId = False
  21. Attribute VB_Exposed = True
  22. '  ******************************
  23. '  ******************************
  24. '  ** MASTERING VB6            **
  25. '  ** by Evangelos Petroutos   **
  26. '  ** SYBEX, 1998              **
  27. '  ******************************
  28. '  ******************************
  29. Enum Flat3D
  30.     Flat
  31.     [3D]        ' must be bracketed because it's not a valid variable name
  32. End Enum
  33. Enum ReqOpt
  34.     [Optional]  ' must be bracketed because Optional is a VB keyword
  35.     Required
  36. End Enum
  37. 'Default Property Values:
  38. Const m_def_Mandatory = 0
  39. Const m_def_MandatoryColor = &HFF
  40. Const m_def_EnterFocusColor = &HFFFF00
  41. Const m_def_LeaveFocusColor = &HFFFFFF
  42. 'Property Variables:
  43. Dim m_Mandatory As ReqOpt
  44. Dim m_MandatoryColor As OLE_COLOR
  45. Dim m_EnterFocusColor As OLE_COLOR
  46. Dim m_LeaveFocusColor As OLE_COLOR
  47. 'Event Declarations:
  48. Event OLECompleteDrag(Effect As Long) 'MappingInfo=Text1,Text1,-1,OLECompleteDrag
  49. Attribute OLECompleteDrag.VB_Description = "Occurs at the OLE drag/drop source control after a manual or automatic drag/drop has been completed or canceled."
  50. Event Click() 'MappingInfo=Text1,Text1,-1,Click
  51. Attribute Click.VB_Description = "Occurs when the user presses and then releases a mouse button over an object."
  52. Event DblClick() 'MappingInfo=Text1,Text1,-1,DblClick
  53. Attribute DblClick.VB_Description = "Occurs when the user presses and releases a mouse button and then presses and releases it again over an object."
  54. Event KeyDown(KeyCode As Integer, Shift As Integer) 'MappingInfo=Text1,Text1,-1,KeyDown
  55. Attribute KeyDown.VB_Description = "Occurs when the user presses a key while an object has the focus."
  56. Event KeyPress(KeyAscii As Integer) 'MappingInfo=Text1,Text1,-1,KeyPress
  57. Attribute KeyPress.VB_Description = "Occurs when the user presses and releases an ANSI key."
  58. Event KeyUp(KeyCode As Integer, Shift As Integer) 'MappingInfo=Text1,Text1,-1,KeyUp
  59. Attribute KeyUp.VB_Description = "Occurs when the user releases a key while an object has the focus."
  60. Event MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) 'MappingInfo=Text1,Text1,-1,MouseDown
  61. Attribute MouseDown.VB_Description = "Occurs when the user presses the mouse button while an object has the focus."
  62. Event MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) 'MappingInfo=Text1,Text1,-1,MouseMove
  63. Attribute MouseMove.VB_Description = "Occurs when the user moves the mouse."
  64. Event MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) 'MappingInfo=Text1,Text1,-1,MouseUp
  65. Attribute MouseUp.VB_Description = "Occurs when the user releases the mouse button while an object has the focus."
  66. Event Change() 'MappingInfo=Text1,Text1,-1,Change
  67. Attribute Change.VB_Description = "Occurs when the contents of a control have changed."
  68. Event OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single) 'MappingInfo=Text1,Text1,-1,OLEDragDrop
  69. Attribute OLEDragDrop.VB_Description = "Occurs when data is dropped onto the control via an OLE drag/drop operation, and OLEDropMode is set to manual."
  70. Event OLEDragOver(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single, State As Integer) 'MappingInfo=Text1,Text1,-1,OLEDragOver
  71. Attribute OLEDragOver.VB_Description = "Occurs when the mouse is moved over the control during an OLE drag/drop operation, if its OLEDropMode property is set to manual."
  72. Event OLEGiveFeedback(Effect As Long, DefaultCursors As Boolean) 'MappingInfo=Text1,Text1,-1,OLEGiveFeedback
  73. Attribute OLEGiveFeedback.VB_Description = "Occurs at the source control of an OLE drag/drop operation when the mouse cursor needs to be changed."
  74. Event OLESetData(Data As DataObject, DataFormat As Integer) 'MappingInfo=Text1,Text1,-1,OLESetData
  75. Attribute OLESetData.VB_Description = "Occurs at the OLE drag/drop source control when the drop target requests data that was not provided to the DataObject during the OLEDragStart event."
  76. Event OLEStartDrag(Data As DataObject, AllowedEffects As Long) 'MappingInfo=Text1,Text1,-1,OLEStartDrag
  77. Attribute OLEStartDrag.VB_Description = "Occurs when an OLE drag/drop operation is initiated either manually or automatically."
  78. Event Validate(Cancel As Boolean) 'MappingInfo=Text1,Text1,-1,Validate
  79. Attribute Validate.VB_Description = "Occurs when a control loses focus to a control that causes validation."
  80. 'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
  81. 'MappingInfo=Text1,Text1,-1,BackColor
  82. Public Property Get BackColor() As OLE_COLOR
  83. Attribute BackColor.VB_Description = "Returns/sets the background color used to display text and graphics in an object."
  84.     BackColor = Text1.BackColor
  85. End Property
  86. Public Property Let BackColor(ByVal New_BackColor As OLE_COLOR)
  87.     Text1.BackColor() = New_BackColor
  88.     PropertyChanged "BackColor"
  89. End Property
  90. 'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
  91. 'MappingInfo=Text1,Text1,-1,ForeColor
  92. Public Property Get ForeColor() As OLE_COLOR
  93. Attribute ForeColor.VB_Description = "Returns/sets the foreground color used to display text and graphics in an object."
  94.     ForeColor = Text1.ForeColor
  95. End Property
  96. Public Property Let ForeColor(ByVal New_ForeColor As OLE_COLOR)
  97.     Text1.ForeColor() = New_ForeColor
  98.     PropertyChanged "ForeColor"
  99. End Property
  100. 'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
  101. 'MappingInfo=Text1,Text1,-1,Enabled
  102. Public Property Get Enabled() As Boolean
  103. Attribute Enabled.VB_Description = "Returns/sets a value that determines whether an object can respond to user-generated events."
  104.     Enabled = Text1.Enabled
  105. End Property
  106. Public Property Let Enabled(ByVal New_Enabled As Boolean)
  107.     Text1.Enabled() = New_Enabled
  108.     PropertyChanged "Enabled"
  109. End Property
  110. 'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
  111. 'MappingInfo=Text1,Text1,-1,Font
  112. Public Property Get Font() As Font
  113. Attribute Font.VB_Description = "Returns a Font object."
  114. Attribute Font.VB_UserMemId = -512
  115.     Set Font = Text1.Font
  116. End Property
  117. Public Property Set Font(ByVal New_Font As Font)
  118.     Set Text1.Font = New_Font
  119.     PropertyChanged "Font"
  120. End Property
  121. 'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
  122. 'MappingInfo=Text1,Text1,-1,Refresh
  123. Public Sub Refresh()
  124. Attribute Refresh.VB_Description = "Forces a complete repaint of a object."
  125.     Text1.Refresh
  126. End Sub
  127. Private Sub Text1_Click()
  128.     RaiseEvent Click
  129. End Sub
  130. Private Sub Text1_DblClick()
  131.     RaiseEvent DblClick
  132. End Sub
  133. Private Sub Text1_GotFocus()
  134.     Text1.BackColor = EnterFocusColor
  135. End Sub
  136. Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
  137.     RaiseEvent KeyDown(KeyCode, Shift)
  138. End Sub
  139. Private Sub Text1_KeyPress(KeyAscii As Integer)
  140.     RaiseEvent KeyPress(KeyAscii)
  141. End Sub
  142. Private Sub Text1_KeyUp(KeyCode As Integer, Shift As Integer)
  143.     RaiseEvent KeyUp(KeyCode, Shift)
  144. End Sub
  145. Private Sub Text1_LostFocus()
  146.     If Len(Trim(Text1.Text)) = 0 And m_Mandatory = Required Then
  147.         Text1.BackColor = m_MandatoryColor
  148.     Else
  149.         Text1.BackColor = m_LeaveFocusColor
  150.     End If
  151. End Sub
  152. Private Sub Text1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  153.     RaiseEvent MouseDown(Button, Shift, X, Y)
  154. End Sub
  155. Private Sub Text1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  156.     RaiseEvent MouseMove(Button, Shift, X, Y)
  157. End Sub
  158. Private Sub Text1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
  159.     RaiseEvent MouseUp(Button, Shift, X, Y)
  160. End Sub
  161. 'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
  162. 'MappingInfo=Text1,Text1,-1,Appearance
  163. Public Property Get Appearance() As Flat3D
  164. Attribute Appearance.VB_Description = "Returns/sets whether or not an object is painted at run time with 3-D effects."
  165. Attribute Appearance.VB_UserMemId = -520
  166.     Appearance = Text1.Appearance
  167. End Property
  168. Public Property Let Appearance(ByVal New_Appearance As Flat3D)
  169.     Text1.Appearance() = New_Appearance
  170.     PropertyChanged "Appearance"
  171. End Property
  172. Private Sub Text1_Change()
  173.     RaiseEvent Change
  174. End Sub
  175. 'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
  176. 'MappingInfo=Text1,Text1,-1,MaxLength
  177. Public Property Get MaxLength() As Long
  178. Attribute MaxLength.VB_Description = "Returns/sets the maximum number of characters that can be entered in a control."
  179.     MaxLength = Text1.MaxLength
  180. End Property
  181. Public Property Let MaxLength(ByVal New_MaxLength As Long)
  182.     Text1.MaxLength() = New_MaxLength
  183.     PropertyChanged "MaxLength"
  184. End Property
  185. 'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
  186. 'MappingInfo=Text1,Text1,-1,MultiLine
  187. Public Property Get MultiLine() As Boolean
  188. Attribute MultiLine.VB_Description = "Returns/sets a value that determines whether a control can accept multiple lines of text."
  189.     MultiLine = Text1.MultiLine
  190. End Property
  191. 'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
  192. 'MappingInfo=Text1,Text1,-1,OLEDrag
  193. Public Sub OLEDrag()
  194. Attribute OLEDrag.VB_Description = "Starts an OLE drag/drop event with the given control as the source."
  195.     Text1.OLEDrag
  196. End Sub
  197. Private Sub Text1_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
  198.     RaiseEvent OLEDragDrop(Data, Effect, Button, Shift, X, Y)
  199. End Sub
  200. 'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
  201. 'MappingInfo=Text1,Text1,-1,OLEDragMode
  202. Public Property Get OLEDragMode() As Integer
  203. Attribute OLEDragMode.VB_Description = "Returns/Sets whether this object can act as an OLE drag/drop source, and whether this process is started automatically or under programmatic control."
  204.     OLEDragMode = Text1.OLEDragMode
  205. End Property
  206. Public Property Let OLEDragMode(ByVal New_OLEDragMode As Integer)
  207.     Text1.OLEDragMode() = New_OLEDragMode
  208.     PropertyChanged "OLEDragMode"
  209. End Property
  210. Private Sub Text1_OLEDragOver(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single, State As Integer)
  211.     RaiseEvent OLEDragOver(Data, Effect, Button, Shift, X, Y, State)
  212. End Sub
  213. 'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
  214. 'MappingInfo=Text1,Text1,-1,OLEDropMode
  215. Public Property Get OLEDropMode() As Integer
  216. Attribute OLEDropMode.VB_Description = "Returns/Sets whether this object can act as an OLE drop target, and whether this takes place automatically or under programmatic control."
  217.     OLEDropMode = Text1.OLEDropMode
  218. End Property
  219. Public Property Let OLEDropMode(ByVal New_OLEDropMode As Integer)
  220.     Text1.OLEDropMode() = New_OLEDropMode
  221.     PropertyChanged "OLEDropMode"
  222. End Property
  223. Private Sub Text1_OLEGiveFeedback(Effect As Long, DefaultCursors As Boolean)
  224.     RaiseEvent OLEGiveFeedback(Effect, DefaultCursors)
  225. End Sub
  226. Private Sub Text1_OLESetData(Data As DataObject, DataFormat As Integer)
  227.     RaiseEvent OLESetData(Data, DataFormat)
  228. End Sub
  229. Private Sub Text1_OLEStartDrag(Data As DataObject, AllowedEffects As Long)
  230.     RaiseEvent OLEStartDrag(Data, AllowedEffects)
  231. End Sub
  232. 'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
  233. 'MappingInfo=Text1,Text1,-1,PasswordChar
  234. Public Property Get PasswordChar() As String
  235. Attribute PasswordChar.VB_Description = "Returns/sets a value that determines whether characters typed by a user or placeholder characters are displayed in a control."
  236.     PasswordChar = Text1.PasswordChar
  237. End Property
  238. Public Property Let PasswordChar(ByVal New_PasswordChar As String)
  239.     Text1.PasswordChar() = New_PasswordChar
  240.     PropertyChanged "PasswordChar"
  241. End Property
  242. 'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
  243. 'MappingInfo=Text1,Text1,-1,Text
  244. Public Property Get Text() As String
  245. Attribute Text.VB_Description = "Returns/sets the text contained in the control."
  246.     Text = Text1.Text
  247. End Property
  248. Public Property Let Text(ByVal New_Text As String)
  249.     Text1.Text() = New_Text
  250.     PropertyChanged "Text"
  251. End Property
  252. 'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
  253. 'MappingInfo=Text1,Text1,-1,ToolTipText
  254. Public Property Get ToolTipText() As String
  255. Attribute ToolTipText.VB_Description = "Returns/sets the text displayed when the mouse is paused over the control."
  256.     ToolTipText = Text1.ToolTipText
  257. End Property
  258. Public Property Let ToolTipText(ByVal New_ToolTipText As String)
  259.     Text1.ToolTipText() = New_ToolTipText
  260.     PropertyChanged "ToolTipText"
  261. End Property
  262. Private Sub Text1_Validate(Cancel As Boolean)
  263.     RaiseEvent Validate(Cancel)
  264. End Sub
  265. 'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
  266. 'MemberInfo=10,0,0,&HFFC0C0
  267. Public Property Get EnterFocusColor() As OLE_COLOR
  268. Attribute EnterFocusColor.VB_Description = "Reads/Sets the color of the custom TextBox when it receives focus"
  269.     EnterFocusColor = m_EnterFocusColor
  270. End Property
  271. Public Property Let EnterFocusColor(ByVal New_EnterFocusColor As OLE_COLOR)
  272.     m_EnterFocusColor = New_EnterFocusColor
  273.     PropertyChanged "EnterFocusColor"
  274. End Property
  275. 'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
  276. 'MemberInfo=10,0,0,&HFFFFFF
  277. Public Property Get LeaveFocusColor() As OLE_COLOR
  278. Attribute LeaveFocusColor.VB_Description = "Reads/Sets the color of the custom TextBox when it loses focus"
  279.     LeaveFocusColor = m_LeaveFocusColor
  280. End Property
  281. Public Property Let LeaveFocusColor(ByVal New_LeaveFocusColor As OLE_COLOR)
  282.     m_LeaveFocusColor = New_LeaveFocusColor
  283.     PropertyChanged "LeaveFocusColor"
  284. End Property
  285. 'Initialize Properties for User Control
  286. Private Sub UserControl_InitProperties()
  287.     m_EnterFocusColor = m_def_EnterFocusColor
  288.     m_LeaveFocusColor = m_def_LeaveFocusColor
  289.     m_Mandatory = m_def_Mandatory
  290.     m_MandatoryColor = m_def_MandatoryColor
  291. End Sub
  292. 'Load property values from storage
  293. Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
  294.     Text1.BackColor = PropBag.ReadProperty("BackColor", &H80000005)
  295.     Text1.ForeColor = PropBag.ReadProperty("ForeColor", &H80000008)
  296.     Text1.Enabled = PropBag.ReadProperty("Enabled", True)
  297.     Set Text1.Font = PropBag.ReadProperty("Font", Ambient.Font)
  298.     Text1.Appearance = PropBag.ReadProperty("Appearance", 1)
  299.     Text1.CausesValidation = PropBag.ReadProperty("CausesValidation", True)
  300.     Text1.MaxLength = PropBag.ReadProperty("MaxLength", 0)
  301.     Text1.OLEDragMode = PropBag.ReadProperty("OLEDragMode", 0)
  302.     Text1.OLEDropMode = PropBag.ReadProperty("OLEDropMode", 0)
  303.     Text1.PasswordChar = PropBag.ReadProperty("PasswordChar", "")
  304.     Text1.Text = PropBag.ReadProperty("Text", "Text1")
  305.     Text1.ToolTipText = PropBag.ReadProperty("ToolTipText", "")
  306.     m_EnterFocusColor = PropBag.ReadProperty("EnterFocusColor", m_def_EnterFocusColor)
  307.     m_LeaveFocusColor = PropBag.ReadProperty("LeaveFocusColor", m_def_LeaveFocusColor)
  308.     m_Mandatory = PropBag.ReadProperty("Mandatory", m_def_Mandatory)
  309.     m_MandatoryColor = PropBag.ReadProperty("MandatoryColor", m_def_MandatoryColor)
  310.     Set MouseIcon = PropBag.ReadProperty("MouseIcon", Nothing)
  311.     Text1.MousePointer = PropBag.ReadProperty("MousePointer", 0)
  312. End Sub
  313. Private Sub UserControl_Resize()
  314.     Text1.Move 0, 0, UserControl.Width, UserControl.Height
  315. End Sub
  316. 'Write property values to storage
  317. Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
  318.     Call PropBag.WriteProperty("BackColor", Text1.BackColor, &H80000005)
  319.     Call PropBag.WriteProperty("ForeColor", Text1.ForeColor, &H80000008)
  320.     Call PropBag.WriteProperty("Enabled", Text1.Enabled, True)
  321.     Call PropBag.WriteProperty("Font", Text1.Font, Ambient.Font)
  322.     Call PropBag.WriteProperty("Appearance", Text1.Appearance, 1)
  323.     Call PropBag.WriteProperty("CausesValidation", Text1.CausesValidation, True)
  324.     Call PropBag.WriteProperty("DataMember", Text1.DataMember, "")
  325.     Call PropBag.WriteProperty("DataSource", DataSource, Nothing)
  326.     Call PropBag.WriteProperty("MaxLength", Text1.MaxLength, 0)
  327.     Call PropBag.WriteProperty("OLEDragMode", Text1.OLEDragMode, 0)
  328.     Call PropBag.WriteProperty("OLEDropMode", Text1.OLEDropMode, 0)
  329.     Call PropBag.WriteProperty("PasswordChar", Text1.PasswordChar, "")
  330.     Call PropBag.WriteProperty("Text", Text1.Text, "Text1")
  331.     Call PropBag.WriteProperty("ToolTipText", Text1.ToolTipText, "")
  332.     Call PropBag.WriteProperty("EnterFocusColor", m_EnterFocusColor, m_def_EnterFocusColor)
  333.     Call PropBag.WriteProperty("LeaveFocusColor", m_LeaveFocusColor, m_def_LeaveFocusColor)
  334.     Call PropBag.WriteProperty("Mandatory", m_Mandatory, m_def_Mandatory)
  335.     Call PropBag.WriteProperty("MandatoryColor", m_MandatoryColor, m_def_MandatoryColor)
  336.     Call PropBag.WriteProperty("DataFormat", DataFormat, Nothing)
  337.     Call PropBag.WriteProperty("DataSource", DataSource, Nothing)
  338.     Call PropBag.WriteProperty("MouseIcon", MouseIcon, Nothing)
  339.     Call PropBag.WriteProperty("MousePointer", Text1.MousePointer, 0)
  340. End Sub
  341. 'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
  342. 'MemberInfo=7,0,0,0
  343. Public Property Get Mandatory() As ReqOpt
  344.     Mandatory = m_Mandatory
  345. End Property
  346. Public Property Let Mandatory(ByVal New_Mandatory As ReqOpt)
  347.     m_Mandatory = New_Mandatory
  348.     If m_Mandatory = Required Then
  349.         Text1.BackColor = m_MandatoryColor
  350.     Else
  351.         Text1.BackColor = m_def_LeaveFocusColor
  352.     End If
  353.     PropertyChanged "Mandatory"
  354. End Property
  355. 'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
  356. 'MemberInfo=10,0,0,&HFF0000
  357. Public Property Get MandatoryColor() As OLE_COLOR
  358.     MandatoryColor = m_MandatoryColor
  359. End Property
  360. Public Property Let MandatoryColor(ByVal New_MandatoryColor As OLE_COLOR)
  361.     m_MandatoryColor = New_MandatoryColor
  362.     If m_Mandatory Then Text1.BackColor = New_MandatoryColor
  363.     PropertyChanged "MandatoryColor"
  364. End Property
  365. 'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
  366. 'MappingInfo=Text1,Text1,-1,MouseIcon
  367. Public Property Get MouseIcon() As Picture
  368. Attribute MouseIcon.VB_Description = "Sets a custom mouse icon."
  369.     Set MouseIcon = Text1.MouseIcon
  370. End Property
  371. Public Property Set MouseIcon(ByVal New_MouseIcon As Picture)
  372.     Set Text1.MouseIcon = New_MouseIcon
  373.     PropertyChanged "MouseIcon"
  374. End Property
  375. 'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
  376. 'MappingInfo=Text1,Text1,-1,MousePointer
  377. Public Property Get MousePointer() As Integer
  378. Attribute MousePointer.VB_Description = "Returns/sets the type of mouse pointer displayed when over part of an object."
  379.     MousePointer = Text1.MousePointer
  380. End Property
  381. Public Property Let MousePointer(ByVal New_MousePointer As Integer)
  382.     Text1.MousePointer() = New_MousePointer
  383.     PropertyChanged "MousePointer"
  384. End Property
  385. Private Sub Text1_OLECompleteDrag(Effect As Long)
  386.     RaiseEvent OLECompleteDrag(Effect)
  387. End Sub
  388.