Article ID: 138798
Article Last Modified on 7/13/2004
Type recttype
l As Integer ' left of rectangular region
t As Integer ' top of region
r As Integer ' right of region
b As Integer ' bottom of region
End Type
' Note the following Declare must be on one, single line:
Declare Function SendMessage Lib "user" (ByVal hwnd%, ByVal wMsg%,
ByVal wp%, lp As Any) As Long
Private Sub Form_Load ()
EM_SETRECT = &H403 ' Set EM_SETRECT variable
Dim rect As recttype ' dim variable as rectype
rect.l = 0 ' Set left to upper left corner
rect.t = 0 ' Set top to upper left corner
rect.r = 200 ' Set right of region
rect.b = 200 ' Set bottom of region
x% = SendMessage(text1.hwnd, EM_SETRECT, 0, rect)
End Sub
Keywords: kbhowto kbprogramming kbui KB138798