TDBGridInplaceEdit 的控件, 请问用vb 如何赋值呀
有个程序里的一个输入框 , 在spy++里看到的类名是 TDBGridE, 当光标焦点在此控件时候, 即才会出现 TDBGridInplaceEdit 这个控件, 请问如何往这样的控件里传送字符串? 用sendmessage 可以吗
谢谢了
搜了好久了找不到解决办法, 不知道是没有教程, 还是我搜的关键字不对
[解决办法]
Private Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long'将一个字符串通过PostMessage传送出去Public Sub subPostString(ByVal lngHandle As Long, ByVal strP As String) Dim intP As Integer Dim intK As Integer Dim lngAsc As Long Dim lngP As Long Dim strT As StringOn Error GoTo errSub For intP = 0 To Len(strP) - 1 strT = Mid(strP, intP + 1, 1) If Asc(strT) <= 0 Then lngAsc = AscW(StrConv(strT, 128)) If lngAsc < 0 Then lngAsc = lngAsc + 65536 '2^16 End If Else lngAsc = Asc(strT) End If lngP = PostMessage(lngHandle, WM_CHAR, lngAsc, 0) Next intP' Call subDelay(10)' lngP = PostMessage(lngActiveWindow, WM_LBUTTONDOWN, MK_LBUTTON, 0) Exit SuberrSub:End Sub