ΪºÎÓÃvb api»ñÈ¡µÄ´°¿Ú±êÌâΪ¿Õ£¬¶øSPY++È´¿ÉÒÔ
VBÖÐcallbacke function ÈçÏ£º
Public Function EnumChildProc(ByVal hwnd As Long, ByVal lParam As Long) As Long
Dim slength As Long, WndTitle As String ' title bar text length and buffer
Dim retval As Long ' return value
Dim WClass As String * 50
Static winnum As Integer ' counter keeps track of how many windows have been enumerated
winnum = winnum + 1 ' one more window enumerated....
slength = GetWindowTextLength(hwnd) + 1 ' get length of title bar text
WndTitle = Space(slength) ' make room in the buffer
retval = GetWindowText(hwnd, WndTitle, slength) ' get title bar text
GetClassName hwnd, WClass, 50
EnumChildProc = 1 ' return value of 1 means continue enumeration
End Function
½á¹ûÁбíÔÚexcelÖУ¬´°¿Ú¾ä±úΪ66622µÄÀà¿ÉÒÔÕÒµ½£¬µ«ÊÇTitleȴΪ¿Õ
ChildWndHnd ChildWndClass ChildWndTitle
66624 TCoolBar
66626 TToolBar
66620 TCoolBar
66622 TToolBar
66618 TPanel
µ«ÊÇΪʲôSPY++ÖÐÈ´¿ÉÒÔÕÒµ½£º
retval = GetWindowText(hwnd, WndTitle, slength)
¼ì²éretvalµÄÖµ,¿´¿´º¯ÊýÖ´ÐеĽá¹ûÊÇʲô.
APIµÄµ÷Óö¼»áÓзµ»ØÖµ,¶¼»á¸æËßÄã·¢ÉúÁËЩʲô.
ÒÔÉÏ´úÂë¿´²»³öhwndÊÇÈçº
Ïà¹ØÎÊ´ð£º
ÔÚVBÖУ¬ÈçºÎÖ´ÐÐÏÂÃæµÄSQLÓï¾ä
Update t_Icitem Set f_102 = IsNull(f_102,0)+1 Where FNumber='0001'
±ÈÈ磺
cn.execute("Update t_Icitem Set f_102 = IsNull(f_102,0)+1 Where FNumber= ......
ÎÒÏëдһ¸öasp¶ÁÈ¡±¾µØ»ú×ÓµÄÍøÍ«µÄ¹¦ÄÜ£¬ÐèÒªÓÃvbдһ¸ödll ÔÚÍøÉÏÕÒÁËһϣ¬°ÑÏÂÃæµÄ¶Î¿½Èëvb¹¤³ÌÀ
Option Explicit
Private Const NCBASTAT = &H33
Private Const NCBNAMSZ = 16
Private ......
ÎÒÓÃDelphiдÁËÒ»¸öDLL, DLLÀïÓÐMDIµÄ×Ó´°Ìå,DLL³õʼ»¯Ê± ´«µÝµ÷ÓÃÕßµÄTApplication¸øDLL, ÔÚDelphi7Öе÷ÓÃÒѾͨ¹ý,µ«ÊDz»ÖªµÀÔÚVBÖÐÓÐÎÞTApplication¶ÔÓ¦ÀàÐÍ, ÊÇ·ñÄÜÔÚVBÖе÷ÓÃ?
ÄãºÃ£¬ÓÃinstance²»ÊǾͿÉÒÔÁË ......
´úÂëÈçÏ£º
Private Sub MSFlexGrid1_SelChange()
If MSFlexGrid1.Rows = 1 Then Exit Sub
If MSFlexGrid1.Row = 0 Then Exit Sub
grid_row = MSFlexGrid1.Row
......
Ò»¸ö²éѯijÐÅÏ¢µÄASPÍøÒ³£¬Ìá½»²ÉÓõÄÊÇpost·½·¨£¬²éÕÒ½á¹ûµÄÍøÒ³±ØÐëÓÒ¼üµã»÷¡°²é¿´Ô´Îļþ¡±²ÅÄÜ¿´µ½ÕæÕý²éѯ½á¹ûÍøÒ³µÄÔ´´úÂ룬ÓÃä¯ÀÀÆ÷²Ëµ¥¿´µ½µÄÊDzéѯǰµÄÔ´´úÂë
ÓÃVBÓÐʲô°ì·¨¿ÉÒÔ»ñÈ¡µ½Õâ¸ö²éѯºóµÄÔ´´ú ......