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. The Lounge
  3. HELP - WPF and find control under mouse and Send Click

HELP - WPF and find control under mouse and Send Click

Scheduled Pinned Locked Moved The Lounge
wpfhelpcsharphardwareregex
3 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.
  • P Offline
    P Offline
    peterdrozd
    wrote on last edited by
    #1

    I am trying to code the following with little luck. has anyone a solution to this problem? Does anyone have any source for this? it can not be done with pinvoke and user32 calls. it will not work. I need to find the control under the mouse in the VIEW and I have force a Mouse Click on it. I need to do it from the ModelView. So in the MainViewModel I have an interface to a hardware device. when the device moves the mouse virtually it moves on the screen. So I am able to move the mouse via the device. 1) find window control in the view from mouse position and in ViewModel 2) Send the click to it. The control may be a Button but maybe something else. Does this violate the MVVM Pattern? Thanks

    ------------- Thanks - Pete

    R K 2 Replies Last reply
    0
    • P peterdrozd

      I am trying to code the following with little luck. has anyone a solution to this problem? Does anyone have any source for this? it can not be done with pinvoke and user32 calls. it will not work. I need to find the control under the mouse in the VIEW and I have force a Mouse Click on it. I need to do it from the ModelView. So in the MainViewModel I have an interface to a hardware device. when the device moves the mouse virtually it moves on the screen. So I am able to move the mouse via the device. 1) find window control in the view from mouse position and in ViewModel 2) Send the click to it. The control may be a Button but maybe something else. Does this violate the MVVM Pattern? Thanks

      ------------- Thanks - Pete

      R Offline
      R Offline
      RedDk
      wrote on last edited by
      #2

      [http://www.codeproject.com/Forums/1004257/Silverlight-WPF.aspx](the place to ask this question)[^]

      1 Reply Last reply
      0
      • P peterdrozd

        I am trying to code the following with little luck. has anyone a solution to this problem? Does anyone have any source for this? it can not be done with pinvoke and user32 calls. it will not work. I need to find the control under the mouse in the VIEW and I have force a Mouse Click on it. I need to do it from the ModelView. So in the MainViewModel I have an interface to a hardware device. when the device moves the mouse virtually it moves on the screen. So I am able to move the mouse via the device. 1) find window control in the view from mouse position and in ViewModel 2) Send the click to it. The control may be a Button but maybe something else. Does this violate the MVVM Pattern? Thanks

        ------------- Thanks - Pete

        K Offline
        K Offline
        Kevin Marois
        wrote on last edited by
        #3

        Wrong forum. Use the WPF forum

        If it's not broken, fix it until it is

        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