国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開APP
userphoto
未登錄

開通VIP,暢享免費電子書等14項超值服

開通VIP
VB.NET自動操作其他程序(2)
3、聲明DLL相關(guān)函數(shù)
Declare Auto Function SetForegroundWindow Lib "USER32.DLL" (ByVal hWnd As IntPtr) As Boolean 
    Private Declare Function BringWindowToTop Lib "user32" (ByVal hwnd As IntegerAs Integer 
    Private Declare Function GetDlgItem Lib "user32" (ByVal hwnd As IntegerByVal nIDDlgItem As IntegerAs Integer 
    'GetCaretPos 

    Declare Auto Function GetMenu Lib "USER32.DLL" (ByVal hWnd As IntegerAs Integer 

    Declare Auto Function GetSubMenu Lib "USER32.DLL" (ByVal hMenu As IntegerByVal nPos As IntegerAs Integer 
    Declare Auto Function GetMenuItemCount Lib "USER32.DLL" (ByVal hMenu As IntegerAs Integer 
    Declare Auto Function GetMenuItemID Lib "USER32.DLL" (ByVal hMenu As IntegerByVal nPos As IntegerAs Integer 
    Declare Auto Function RemoveMenu Lib "USER32.DLL" (ByVal hMenu As IntegerByVal nPos As IntegerByVal uFlag As IntegerAs Integer    'uFlag is MF_BYCOMMAND or MF_BYPOSITION 
    Declare Auto Function DeleteMenu Lib "USER32.DLL" (ByVal hMenu As IntegerByVal nPos As IntegerByVal uFlag As IntegerAs Integer    'uFlag is MF_BYCOMMAND or MF_BYPOSITION 
    Declare Auto Function GetMenuState Lib "USER32.DLL" (ByVal hMenu As IntegerByVal nPos As IntegerByVal uFlag As IntegerAs Integer    'uFlag is MF_BYCOMMAND or MF_BYPOSITION 

    Declare Auto Function GetMenuString Lib "USER32.DLL" (ByVal hMenu As IntegerByVal uIDItem As IntegerByVal lpString As StringByValnMaxCount As IntegerByVal uFlag As IntegerAs Integer    'uFlag is MF_BYCOMMAND or MF_BYPOSITION 

    Private Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal hwnd As IntegerByVal lpString As StringByVal cch AsInt32) As Integer 
    Private Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hwnd As IntegerByVal wMsg As Integer, _ 
                                                                           ByVal wParam As IntegerByVal lParam As StringAs Integer 



    '查找窗口 
    '窗口類名 
    <DllImport("user32.dll")> _ 
    Private Shared Function FindWindow(ByVal strClassName As StringByVal strWindowName As StringAs Integer 
        '窗口標題 
    End Function 

    '在窗口列表中尋找與指定條件相符的第一個子窗口 
    ' handle to parent window 
    ' handle to child window 
    '窗口類名           
    <DllImport("user32.dll")> _ 
    Private Shared Function FindWindowEx(ByVal hwndParent As IntegerByVal hwndChildAfter As IntegerByVal className As StringByValwindowName As StringAs Integer 
        ' 窗口標題 
    End Function 
    <DllImport("user32.DLL")> _ 
    Private Shared Function SendMessage(ByVal hWnd As IntegerByVal Msg As UIntegerByVal wParam As IntegerByVal lParam As IntegerAsInteger 
    End Function 
    '找出某個窗口的創(chuàng)建者(線程或進程),返回創(chuàng)建者的標志符 
    <DllImport("user32.dll")> _ 
    Private Shared Function GetWindowThreadProcessId(ByVal hwnd As IntegerByRef processId As IntegerAs Integer 
    End Function 
    '打開一個已存在的進程對象,并返回進程的句柄 
    <DllImport("kernel32.dll")> _ 
    Private Shared Function OpenProcess(ByVal dwDesiredAccess As UIntegerByVal bInheritHandle As BooleanByVal processId As IntegerAsInteger 
    End Function 
    '為指定的進程分配內(nèi)存地址:成功則返回分配內(nèi)存的首地址 
    <DllImport("kernel32.dll")> _ 
    Private Shared Function VirtualAllocEx(ByVal hProcess As IntegerByVal lpAddress As IntPtr, ByVal dwSize As UIntegerByVal flAllocationTypeAs UIntegerByVal flProtect As UIntegerAs Integer 
    End Function 
    '從指定內(nèi)存中讀取字節(jié)集數(shù)據(jù) 
    '被讀取者的進程句柄 
    '開始讀取的內(nèi)存地址 
    '數(shù)據(jù)存儲變量 
    '要寫入多少字節(jié) 
    <DllImport("kernel32.dll")> _ 
    Private Shared Function ReadProcessMemory(ByVal hProcess As IntegerByVal lpBaseAddress As IntegerByVal lpBuffer As IntPtr, ByVal nSizeAs IntegerByRef vNumberOfBytesRead As UIntegerAs Boolean 
        '讀取長度 
    End Function 
    '將數(shù)據(jù)寫入內(nèi)存中 
    '由OpenProcess返回的進程句柄 
    '要寫的內(nèi)存首地址,再寫入之前,此函數(shù)將先檢查目標地址是否可用,并能容納待寫入的數(shù)據(jù) 
    '指向要寫的數(shù)據(jù)的指針 
    '要寫入的字節(jié)數(shù) 
    <DllImport("kernel32.dll")> _ 
    Private Shared Function WriteProcessMemory(ByVal hProcess As IntegerByVal lpBaseAddress As IntegerByVal lpBuffer As IntPtr, ByVal nSizeAs IntegerByRef vNumberOfBytesRead As UIntegerAs Boolean 
    End Function 
    <DllImport("kernel32.dll")> _ 
    Private Shared Function CloseHandle(ByVal handle As IntegerAs Boolean 
    End Function 
    '在其它進程中釋放申請的虛擬內(nèi)存空間 
    '目標進程的句柄,該句柄必須擁有PROCESS_VM_OPERATION的權(quán)限 
    '指向要釋放的虛擬內(nèi)存空間首地址的指針 
    <DllImport("kernel32.dll")> _ 
    Private Shared Function VirtualFreeEx(ByVal hProcess As IntegerByVal lpAddress As IntegerByVal dwSize As UIntegerByVal dwFreeType AsUIntegerAs Boolean 
        '釋放類型 
    End Function 

    Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As IntegerByVal lpString As StringByVal cch AsInt32) As Integer 

    ''' <summary> 
    ''' LVITEM結(jié)構(gòu)體,是列表視圖控件的一個重要的數(shù)據(jù)結(jié)構(gòu) 
    ''' 占空間:(int)x7=28個byte 
    ''' </summary> 
    Private Structure LVITEM 
        '結(jié)構(gòu)體 
        Public mask As Integer 
        '說明此結(jié)構(gòu)中哪些成員是有效的 
        Public iItem As Integer 
        '項目的索引值(可以視為行號)從開始 
        Public iSubItem As Integer 
        '子項的索引值(可以視為列號)從開始 
        Public state As Integer 
        '子項的狀態(tài) 
        Public stateMask As Integer 
        '狀態(tài)有效的屏蔽位 
        Public pszText As IntPtr 
        '主項或子項的名稱 
        Public cchTextMax As Integer 
        'pszText所指向的緩沖區(qū)大小 
    End Structure 
    Private Structure HDITEM 
        Dim mask As Integer 
        Dim cxy As Integer 
        Dim pszText As IntPtr 
        Dim hbm As Integer 
        Dim cchTextMax As Integer 
        Dim fmt As Integer 
        Dim lParam As Integer 
        Dim iImage As Integer 
        Dim iOrder As Integer 
    End Structure 
本站僅提供存儲服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點擊舉報。
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
VB編外掛的一些基礎(chǔ)知識
VB實用代碼,收藏!!
[C#.NET][VB.NET] 用 Win32 API 控制 外部應(yīng)用程式選單
[VB API]如何為一個應(yīng)用程序設(shè)定多個熱鍵?
如何用程序控制滑鼠游標
VB入門技巧N例(1)
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長圖 關(guān)注 下載文章
綁定賬號成功
后續(xù)可登錄賬號暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點擊這里聯(lián)系客服!

聯(lián)系客服