Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
Private Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String) As Long
'parameters
'· hWnd : Identifies the window or control whose text is to be changed.
'· lpString : Points to a null-terminated string to be used as the new title or control text.
'. cch : Specifies the maximum number of characters to copy to the buffer, including the NULL character. If the text exceeds this limit, it is truncated.
'--------------------------------------------------------------
Private Sub Form_Activate()
'KPD-Team 1998
'URL: [url=http://www.allapi.net/]allapi.net[/url]
'E-Mail: [email]KPDTeam@Allapi.net[/email]
Dim MyStr As String
'Create a buffer
MyStr = String(100, Chr$(0))
'Get the windowtext
GetWindowText Me.hwnd, MyStr, 100
'strip the rest of buffer
MyStr = Left$(MyStr, InStr(MyStr, Chr$(0)) - 1)
'Triple the window's text
MyStr = MyStr + MyStr + MyStr
'Set the new window text
SetWindowText Me.hwnd, MyStr
End Sub