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
M

matthew kelly

@matthew kelly
About
Posts
3
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Key Board Hooking and SendInput function
    M matthew kelly

    ;);)I have pulled together a VB.net project that hooks the keyboard (Ref. Paul Kimmel's hooking program) and allow the user to send "mouse right clicks" via the SendInpuut function (mouse emulation works fine). I am also trying to make this project capable of "Rearrange the keyboard" (example type "e" and "K" is sent to the application) by using SendInput function and I am not able to get it to work. I am finding the use of SendInput function for emmulating key board inputs, not very easy to use.. In am wonder, what are the pros and cons of using SendInput, SendKeys and KeyBoardEvent?? I have been able to get the SendKeys function to work in the project and rearrange the keyboard, except for emmulating "PageUp", "PageDown" (problems with the data types,,).. Another reason that I want to use SendInput function over SendKeys, is the ease of being able to strip down the keyboard input to raw data and change what an application would receive... I am looking for further discussion on these topics. I would be very happy to share my project code with someone interested in helping me trouble shoot the SendInput function. The project toggles the keyboard input (new mode = ` / old mode = esc). In "new mode" the "d" key when pressed becomes a mouse right click and the "e" key when pressed should place a "t" (thats the problem), into the keyboard input buffer. The SendInput function fails as it returns a "0" as oppose to a "1".. Reference: Paul Kimmel, Managing Low-Level Keyboard Hooks in VB.NET, Developer. com Thanks to all that have contributed on my project, either directly by helping out at discussion group, email or by articles publisher to the web on Key Board Hooking, SendInput function, Win32 API's,,, Your help has been priceless. Thanks again Matt

    Visual Basic help csharp com json

  • keyboard hooking in VB.net
    M matthew kelly

    I am currently using the vb.net module included in the above article. The code works really well. I am trying to add to this project a new class “CurrentWindowWithKeyboardFocus” , which will include variables and functions that will determine Handle to window with keyboard focus window x position window y position window width window height What I am confused about is how I can get the handle of the window that has the keyboard focus. Is it a handle to a process?? I have attached a preliminary copy of my new class. I am looking for recommendations?? Should the class inherit from "System.Windows.Forms.Control"?? Thanks for your time and attention. Public Class CurrentWindowWithKeyboardFocus Inherits System.Windows.Forms.Control Public CurrentWindow As Control Private CWXPosition As Integer Private CWYPosition As Integer Private CWWidth As Integer Private CWHeight As Integer Private CWHandle As IntPtr Public Sub New() 'gets the handle to the window CWHandle = HandleOfCurrentWindow() 'gets the x postion of the window CWXPosition = XPositionOfCurrentWindow(CWHandle) 'gets the y position of the window CWYPosition = YPositionOfCurrentWindow(CWHandle) 'gets the width of the window CWWidth = WidthOfCurrentWindow(CWHandle) 'gets the height of the window CWHeight = HeightOfCurrentWindow(CWHandle) End Sub Public Function HandleOfCurrentWindow() Dim WindowHandle As Integer Dim p As Process p = Process.GetCurrentProcess WindowHandle = Process.GetCurrentProcess.Handle.ToInt32 'get handle of current window 'return handle Return WindowHandle End Function Public Function XPositionOfCurrentWindow(ByRef intptr) Dim xpos 'get x position of current window 'return integer Return xpos End Function Public Function YPositionOfCurrentWindow(ByRef intptr) Dim Ypos 'get y position of current window 'return integer Return Ypos End Function Public Function WidthOfCurrentWindow(ByRef intptr) Dim Width 'get width of current window 'return integer Return Width End Function Public Function HeightOfCurrentWindow(ByRef intptr) Dim Height 'get width of current window 'return integer Return Height

    Visual Basic csharp html com json

  • keyboard hooking in VB.net
    M matthew kelly

    I have found these (2) articles on keyboard hooking by Paul Kimmel @ codeguru.com and am looking for discussion threads that might have occured around them. I am looking for an vb.net projec examples that use the module. Managing Low-level Keyboard Hooks in VB .NET Dated April 18, 2003 http://www.codeguru.com/vb\_system/PK041803.html Managing Low-Level Keyboard Hooks with the Windows API Dated November 18, 2002 http://www.codeguru.com/vb\_system/PK111802.html I would think that there would be a discussion thread about the articles at this site, but I can't seem to find it. Thank you for your time and attention. Sincerely, Matthew Kelly vb.net programmer newbe

    Visual Basic csharp html com json
  • Login

  • Don't have an account? Register

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