vb如何获取外部程序表格内容如图 200
2个回答
展开全部
'获取控件的内容
Option Explicit
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Const WM_GETTEXT = &HD
Private Const WM_GETTEXTLENGTH = &HEPublic Function GetTextString(ByVal lyHwnd As Long) As String
Dim GetS As String
Dim SLen As Long
SLen = SendMessage(lyHwnd, WM_GETTEXTLENGTH, 0, 0)
If SLen = 0 Then Exit Function
SLen = SLen + 1
GetS = Space(SLen)
SLen = SendMessage(lyHwnd, WM_GETTEXT, SLen, ByVal GetS)
GetTextString = Left(GetS, SLen)
End Function 控件的句柄你应该能获取到,所以不说了
Option Explicit
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Const WM_GETTEXT = &HD
Private Const WM_GETTEXTLENGTH = &HEPublic Function GetTextString(ByVal lyHwnd As Long) As String
Dim GetS As String
Dim SLen As Long
SLen = SendMessage(lyHwnd, WM_GETTEXTLENGTH, 0, 0)
If SLen = 0 Then Exit Function
SLen = SLen + 1
GetS = Space(SLen)
SLen = SendMessage(lyHwnd, WM_GETTEXT, SLen, ByVal GetS)
GetTextString = Left(GetS, SLen)
End Function 控件的句柄你应该能获取到,所以不说了
追问
只能得到 员工刷卡记录6个字啊
2019-09-08
展开全部
反编译看看它连接到哪个数据库,直接连上去获取就好了。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询