Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. window messages hooking???

window messages hooking???

Scheduled Pinned Locked Moved C#
helpquestion
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    SherKar
    wrote on last edited by
    #1

    hi, i want to to hook a certain msg for a window like moving or sizing, this window is standalone app and i have its handle is there any APIS help me do this ?

    M 1 Reply Last reply
    0
    • S SherKar

      hi, i want to to hook a certain msg for a window like moving or sizing, this window is standalone app and i have its handle is there any APIS help me do this ?

      M Offline
      M Offline
      Mazdak
      wrote on last edited by
      #2

      If you want too hook your windows messages of your own application implement IMessageFilter interface and inheit your form from it then use Application.AddMessageFilter to add it to your application and do whatever you want with it. Mazy "I think that only daring speculation can lead us further and not accumulation of facts." - Albert Einstein

      S 1 Reply Last reply
      0
      • M Mazdak

        If you want too hook your windows messages of your own application implement IMessageFilter interface and inheit your form from it then use Application.AddMessageFilter to add it to your application and do whatever you want with it. Mazy "I think that only daring speculation can lead us further and not accumulation of facts." - Albert Einstein

        S Offline
        S Offline
        SherKar
        wrote on last edited by
        #3

        no not my own app but an outside app that i have its handle

        H 1 Reply Last reply
        0
        • S SherKar

          no not my own app but an outside app that i have its handle

          H Offline
          H Offline
          Heath Stewart
          wrote on last edited by
          #4

          You'll need to use a system hook, if nothing more than to inject your code into the other application's process space (since an application doesn't dispatch messages to other processes). See Using Hooks from C#[^].

          Microsoft MVP, Visual C# My Articles

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups