PHP User Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: bbcode_highlight in ..../includes/functions.php on line 4197
Can VB do this...?-VBForums
Results 1 to 7 of 7

Thread: Can VB do this...?

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    May 2004
    Posts
    566

    Arrow Can VB do this...?

    can VB change the window name of another application?

    using SendMessage or something...


    if so.... how?



  2. #2
    Frenzied Member
    Join Date
    Jul 2003
    Posts
    1,269
    wm_settext w/ sendmessage

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    May 2004
    Posts
    566
    sorry i missed some stuff

    but when i say "can VB change the window name of another application?"

    i mean can it change the window name of a NON-VB application?
    say like C++...

    ?

  4. #4
    G&G Moderator chemicalNova's Avatar
    Join Date
    Jun 2002
    Location
    Victoria, Australia
    Posts
    4,246
    Something like this..
    VB Code:
    1. Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
    2. Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
    3. Private Const WM_SETTEXT = &HC
    4.  
    5. Private Sub Command1_Click()
    6. Dim bla As Long
    7. bla = FindWindow(vbNullString, "C:\test.txt - Notepad")
    8. SendMessage bla, WM_SETTEXT, 0&,"Blank :)"
    9. End Sub
    Phreak

    Visual Studio 6, Visual Studio.NET 2005, MASM

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    May 2004
    Posts
    566
    will that work in an ActiveX DLL also?

    like when it's injected into an application..

  6. #6
    G&G Moderator chemicalNova's Avatar
    Join Date
    Jun 2002
    Location
    Victoria, Australia
    Posts
    4,246
    I would assume so, since its API. Give it a shot..

    Phreak

    Visual Studio 6, Visual Studio.NET 2005, MASM

  7. #7
    Hyperactive Member
    Join Date
    Nov 2002
    Location
    Someplace 'ore the rainbow
    Posts
    392
    Why not just use SetWindowCaption?

    cjqp
    When your answer is the Arc Sin of 1.015, you should check your Pythagorean triple.

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width