fishworld2006
Member
I import the lib dzHw,and use function SendMessageToControl.
'get the position of cursor
Sub GetCurLine(txtboxname)
linechar = hdObj.SendMessageToControl(txtboxname, EM_LINEINDEX, -1, 0)
curline = hdObj.SendMessageToControl(txtboxname, EM_LINEFROMCHAR, linechar, 0)
linefirstno = hdObj.SendMessageToControl(txtboxname,EM_GETFIRSTVISIBLELINE,0,0)
Msgbox(curline & "+" & linefirstno,"Tips")
End Sub
When debug, an error ocurred."System.OverflowException"
"linechar = hdObj.SendMessageToControl(txtboxname, EM_LINEINDEX, -1, 0)"
Error Description: value -1 Uint32 too big or small??
How can I do? Tks
'get the position of cursor
Sub GetCurLine(txtboxname)
linechar = hdObj.SendMessageToControl(txtboxname, EM_LINEINDEX, -1, 0)
curline = hdObj.SendMessageToControl(txtboxname, EM_LINEFROMCHAR, linechar, 0)
linefirstno = hdObj.SendMessageToControl(txtboxname,EM_GETFIRSTVISIBLELINE,0,0)
Msgbox(curline & "+" & linefirstno,"Tips")
End Sub
When debug, an error ocurred."System.OverflowException"
"linechar = hdObj.SendMessageToControl(txtboxname, EM_LINEINDEX, -1, 0)"
Error Description: value -1 Uint32 too big or small??
How can I do? Tks