网上找的代码,怎么用到狐表中:
Private Const EM_GETLINECOUNT = &HBA
Private Const EM_LINEFROMCHAR = &HC9
Private Declare Function GetScrollPos Lib "user32" (ByVal hwnd As Long, ByVal nBar As Long) As Long
pos = GetScrollPos(Richtextbox1.hwnd, 1)
pos 变量为 RICHTEXTBOX 的滚动条位置,保存POS 值
设置位置
读取 保存的POS值
Private Declare Function SetScrollPos Lib "user32" Alias "SetScrollPos" (ByVal hwnd As Long, ByVal nBar As Long, ByVal nPos As Long, ByVal bRedraw As Long) As Long
private const SB_VERT = 1
SetScrollPos RichTextBox1.Hwnd, SB_VERT,保存的 pos值, true