当我有进程名称时,我需要知道如何获取这样的应用程序名称:
到目前为止我的进展:
Declare Function GetWindowThreadProcessId Lib "user32.dll" (ByVal hwnd As Int32, ByRef lpdwProcessId As Int32) As Int32
Private Declare Function GetForegroundWindow Lib "user32" Alias "GetForegroundWindow" () As IntPtr
'Private Declare Auto Function GetWindowText Lib "user32" (ByVal hWnd As System.IntPtr, ByVal lpString As System.Text.StringBuilder, ByVal cch As Integer) As Integer
Private makel As String
Private Function GetActiveAppProcess() As Process
Dim activeProcessID As IntPtr
GetWindowThreadProcessId(GetForegroundWindow(), activeProcessID)
Return Process.GetProcessById(activeProcessID)
End Function
Sub GetProcInfo()
Dim activeProcess As Process = GetActiveAppProcess()
With activeProcess
ProcessName = …Run Code Online (Sandbox Code Playgroud) 如何使用CefSharp获取HTML元素的值?
我知道如何处理这个默认的WebBrowser控件:
Dim Elem As HtmlElement = WebBrowser1.Document.GetElementByID("id")
Run Code Online (Sandbox Code Playgroud)
但我没有找到类似的CefSharp.我使用CefSharp的主要原因是因为网站的一部分使用iframe来存储源,而默认的WebBrowser不支持它.此外,CefSharp是否可以选择InvokeMember或类似的呼叫?
顺便说一下,我正在使用最新版本的CefSharp.