新建From1(窗体),新建Command1(按钮CommandButton),代码:
Private Declare Function SetWindowText Lib "user32.dll" Alias "SetWindowTextA" (ByVal hWnd As Long, ByVal lpString As String) As Long
Private Sub Command1_Click()
Dim ret As Long
ret = SetWindowText(Me.hWnd, "这是Windows设置的标题")
End Sub