• Hello Guest! Welcome to ConsoleCrunch, to help support our site check out the premium upgrades HERE! to get exclusive access to our hidden content.
  • Unable to load portions of the website...
    If you use an ad blocker addon, you should disable it because it interferes with several elements of the site and blocks more than just adverts.
  • Read Rules Before Posting Post Virus Scans with every program.

VB.NET Setting an External Program's Title window

1UP

Member
I have been working on making some trainers for some games and I wanted a basic way of showing that a cheat was enabled. I couldn't figured out how to draw to the screen so I figured the title bar would be fine.

Code:
 Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" (ByVal hWnd As IntPtr, ByVal lpString As String) As Boolean

  Public Sub SetTitleText(ByVal processName() As Process, ByVal textToSend As String)

  For Each proc In processName
  SetWindowText(proc.MainWindowHandle, textToSend)
  Next
  End Sub

The code above will allow you to set the title window to an external program.

An example on how to use it

Code:
Dim notepad() As Process = Process.GetProcessesByName("notepad")

  Private Sub btn_Notepad_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_Notepad.Click
  SetTitleText(notepad,"Insert some text here")

  End Sub
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Chat Bot:
    Christo has joined the room.
  • Chat Bot:
    Christo has joined the room.
  • Chat Bot:
    Omar-_- is our newest member. Welcome!
  • Chat Bot:
    Christo has joined the room.
  • Chat Bot:
    QM|T_JinX has joined the room.
  • Chat Bot:
    lilmonster3 is our newest member. Welcome!
  • Chat Bot:
    Christo has joined the room.
  • Chat Bot:
    QM|T_JinX has joined the room.
  • Chat Bot:
    QM|T_JinX has joined the room.
  • Chat Bot:
    765rdchy5rfvbj5edcvj4ed is our newest member. Welcome!
  • Chat Bot:
    QM|T_JinX has joined the room.
  • Chat Bot:
    Christo has joined the room.
  • Chat Bot:
    wilson sales is our newest member. Welcome!
  • Chat Bot:
    riggv is our newest member. Welcome!
  • Chat Bot:
    ripthors is our newest member. Welcome!
  • Chat Bot:
    QM|T_JinX has joined the room.
  • Chat Bot:
    Christo has joined the room.
  • Chat Bot:
    modmonkey is our newest member. Welcome!
  • Chat Bot:
    QM|T_JinX has joined the room.
  • Chat Bot:
    ZynxDEX is our newest member. Welcome!
  • Chat Bot:
    ZynxDEX has started a new thread called "Console ID" in Console ID's.
  • Chat Bot:
    keplerland is our newest member. Welcome!
  • Chat Bot:
    QM|T_JinX has joined the room.
  • Chat Bot:
    Christo has joined the room.
  • Chat Bot:
    orencoooo is our newest member. Welcome!
      Chat Bot: orencoooo is our newest member. Welcome!
      Back
      Top