Private Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String) As Long Private Sub Command1_Click() SetWindowText Me.hwnd, Text1 '标题设置为Text1 End Sub '注意:只对窗体标题有效,其它无效