如何使用 vb.net 获取进程的窗口标题 [英] how to get the window title of a process using vb.net
本文介绍了如何使用 vb.net 获取进程的窗口标题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我希望从进程名称转到窗口标题.
I am looking to go from the process name to the windows title.
例如
'winamp.exe' -> '1.布兰妮斯皮尔斯 - 再打我一次宝贝'
'winamp.exe' -> '1. Britney Spears - Hit me baby one more time'
谢谢
解决方案:
Dim p As Process
For Each p In Process.GetProcessesByName("winamp")
MsgBox(p.MainWindowTitle.ToString)
Next
推荐答案
查看 System.Diagnostics.Process
类:
Process p = <Get process>
Console.WriteLine(p.MainWindowTitle)
这篇关于如何使用 vb.net 获取进程的窗口标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文