API声明:
Public Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String) As Long
Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
使用:
Dim intHwnd As Long
intHwnd = FindWindow(vbNullString, "窗口原标题")
SetWindowText intHwnd, "Welcome to Stoneren.com"
先找了才改,哪我同时打开多个窗口呢?我是每个窗口都要把一句话嵌进去呀?
Being a devil is the same as being a human. We should be kind. If we are kind, we are not a devil, we are a hybrid.
我觉得你还没明白我在说什么。我是说我把我的一个程序显示的文字嵌到的我的电脑显示的标题栏中
Being a devil is the same as being a human. We should be kind. If we are kind, we are not a devil, we are a hybrid.
我的一个程序显示的文字 = XXX String
嵌到的我的电脑显示的标题栏中 = SetWindowText (我的电脑.Hwnd,"XXX String")
API的确是好东西呀。。。。。。
Being a devil is the same as being a human. We should be kind. If we are kind, we are not a devil, we are a hybrid.