您需要製作一個程序來執行此操作。
您需要調用Windows的API。這是如何製作標題欄更改程序。
使用記事本創建一個文件,並將其稱爲SetText.bas。將其存儲在桌面上。
將其粘貼到其中。
Imports System
Imports System.Runtime.InteropServices
Imports Microsoft.Win32
Public Module MyApplication
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String) As Long
Sub Main()
On Error Resume Next
Dim CmdLine As String
Dim Ret as Long
Dim A() as String
Dim hwindows as long
CmdLine = Command()
If Left(CmdLine, 2) = "/?" Then
MsgBox("Usage:" & vbCrLf & vbCrLf & "ChangeTitleBar Oldname NewName")
Else
A = Split(CmdLine, Chr(34), -1, vbBinaryCompare)
hwindows = FindWindow(vbNullString, A(1))
Ret = SetWindowText(hwindows, A(3))
End If
End Sub
End Module
然後在命令提示符窗口中鍵入。
"C:\Windows\Microsoft.NET\Framework\v4.0.30319\vbc.exe" /target:winexe /out:"%userprofile%\desktop\SetText.exe" "%userprofile%\desktop\settext.bas" /verbose
程序已在您的桌面上創建,名爲settext.exe。使用
"%userprofile%\desktop\settext" "Untitled - Notepad" "A Renamed Notepad"