Results 1 to 7 of 7

Thread: Fu***** window caption !!!!!!

  1. #1
    Guest

    Angry

    Hello to all,

    I have serious problem, whant to change a window caption, i created program to do that, but the problem is that window is showed on the tray bar, i writ the window name on my prog. and writ the second name that i whant to give her, on the tray bar the name is changed but on the own window the name is the same, i realy need help because i need to run a prog that locates the first one and closes him self down.

    numibesi

  2. #2
    Guest
    Use SetWindowText.
    Code:
    Private Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String) As Long
    
    Private Sub Command1_Click()
        SetWindowText hwnd, ByVal "NewText"
    End Sub

  3. #3
    Guest

    not working

    This is currently my code, but this is renaming my program window caption and i whant to change the othr prog. window caption.

    Code:
    Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
    Private Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String) As Long
    
    Private Sub Command1_Click()
    Dim W
        W = FindWindow(vbNullString, "Cheat 'O Matic")
        SetWindowText hwnd, ByVal "WON"
    End Sub
    numibesi

  4. #4
    Guest
    That's because you are stating your own application as the window to change.
    hwnd = Your application's hwnd

    Try this:

    Code:
    Private Sub Command1_Click()
    Dim W
        W = FindWindow(vbNullString, "Cheat 'O Matic")
        SetWindowText W, ByVal "WON"
    End Sub
    [Edited by Matthew Gates on 10-11-2000 at 05:05 PM]

  5. #5
    Guest

    Yeh, but the prob still there

    Yeh i have saw that after i posted the thread, but the problem is the same in the taskbar the name is WON but on the window the caption is Cheat 'O Matic.

    I think i will quit. numibesi

  6. #6
    Guest
    Don't quit!!! Stay on with it and someone will help you! Here's the code that will change BOTH the title bar and the status tray:

    Code:
    Private Declare Function FindWindow Lib "user32" _
    Alias "FindWindowA" (ByVal lpClassName As String, ByVal _
    lpWindowName As String) As Long
    Private Declare Function SetWindowText Lib "user32" _
    Alias "SetWindowTextA" (ByVal hwnd As Long, ByVal lpString _
    As String) As Long
    Public Declare Function DrawMenuBar Lib "user32" _
    Alias "DrawMenuBar" (ByVal hwnd As Long) As Long
    
    Private Sub Command1_Click()
        Dim W
        W = FindWindow(vbNullString, "Cheat 'O Matic")
        SetWindowText W, ByVal "WON"
        DrawMenuBar W
    End Sub

  7. #7
    Guest

    Angry Plese try finding on geocities

    You can find the Cheat 'O Matic prog, with geocities help, try Http:\\www.geocities.com ----> advanced search ----> (check) Exact phrase and type Cheat omatic then please meke the download (Very small) and try changind is window title, you will see that it donĀ“t change, but on the traybar it changes.

    numibesi

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width