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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Windows Forms
  4. Get window handle from mouse, outside form

Get window handle from mouse, outside form

Scheduled Pinned Locked Moved Windows Forms
csharpcomlinuxjsonhelp
1 Posts 1 Posters 1 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.
  • G Offline
    G Offline
    Genbox
    wrote on last edited by
    #1

    I would like to develop a feature from Linux Xserver that makes it possible to resize the currently active window by holding down a key sequence and drag the mouse. My problem is that I need to use the unmanaged Windows API to do that, and I can't get it to work. I've tried to use a global mouse hook and get the window handles from under the mouse, but I could only get X,Y coordinates, and not a usable window handle. Do you have any ideas on how to do this? Edit: I used this to get the X,Y coordinates, but it's only a local hook (but I get a usable window handle, but since it's local, I only get the handle on the form, and not any other window) How to set a Windows hook in Visual C# .NET

    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