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. Visual Basic
  4. SendMessage (backspace) not working!

SendMessage (backspace) not working!

Scheduled Pinned Locked Moved Visual Basic
csharphelpquestion
4 Posts 2 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.
  • F Offline
    F Offline
    FeRtoll
    wrote on last edited by
    #1

    Private Const WM_KEYDOWN = &H100
    Private Const WM_KEYUP = &H101
    Private Const VK_BACKSPACE = &H8

    Private Overloads Shared Function SendMessage(ByVal hWnd As IntPtr, _
    ByVal msg As Integer, ByVal wp As IntPtr, ByVal lp As IntPtr) As IntPtr
    End Function

    SendMessage(windHandle, WM_KEYDOWN, CType(VK_BACKSPACE, IntPtr), CType(&HC0510001, IntPtr))
    SendMessage(windHandle, WM_KEYUP, CType(VK_BACKSPACE, IntPtr), CType(&HC0510001, IntPtr))

    Need help with this one! Its not working... Thank you!

    FeRtoll Software.net ------------ E-Mail me WebPage

    L F 2 Replies Last reply
    0
    • F FeRtoll

      Private Const WM_KEYDOWN = &H100
      Private Const WM_KEYUP = &H101
      Private Const VK_BACKSPACE = &H8

      Private Overloads Shared Function SendMessage(ByVal hWnd As IntPtr, _
      ByVal msg As Integer, ByVal wp As IntPtr, ByVal lp As IntPtr) As IntPtr
      End Function

      SendMessage(windHandle, WM_KEYDOWN, CType(VK_BACKSPACE, IntPtr), CType(&HC0510001, IntPtr))
      SendMessage(windHandle, WM_KEYUP, CType(VK_BACKSPACE, IntPtr), CType(&HC0510001, IntPtr))

      Need help with this one! Its not working... Thank you!

      FeRtoll Software.net ------------ E-Mail me WebPage

      L Offline
      L Offline
      Luc Pattyn
      wrote on last edited by
      #2

      FeRtoll wrote:

      CType(&HC0510001, IntPtr)

      the hex constant does not conform to the documentation[^], at least bits 31 and 30 are wrong. :)

      Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum

      Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.

      F 1 Reply Last reply
      0
      • L Luc Pattyn

        FeRtoll wrote:

        CType(&HC0510001, IntPtr)

        the hex constant does not conform to the documentation[^], at least bits 31 and 30 are wrong. :)

        Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum

        Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.

        F Offline
        F Offline
        FeRtoll
        wrote on last edited by
        #3

        Luc Pattyn wrote:

        the hex constant does not conform to the documentation[^], at least bits 31 and 30 are wrong.

        so what should i do? if you know how can i solve the problem please tell me! :) thank you!

        FeRtoll Software.net ------------ E-Mail me WebPage

        1 Reply Last reply
        0
        • F FeRtoll

          Private Const WM_KEYDOWN = &H100
          Private Const WM_KEYUP = &H101
          Private Const VK_BACKSPACE = &H8

          Private Overloads Shared Function SendMessage(ByVal hWnd As IntPtr, _
          ByVal msg As Integer, ByVal wp As IntPtr, ByVal lp As IntPtr) As IntPtr
          End Function

          SendMessage(windHandle, WM_KEYDOWN, CType(VK_BACKSPACE, IntPtr), CType(&HC0510001, IntPtr))
          SendMessage(windHandle, WM_KEYUP, CType(VK_BACKSPACE, IntPtr), CType(&HC0510001, IntPtr))

          Need help with this one! Its not working... Thank you!

          FeRtoll Software.net ------------ E-Mail me WebPage

          F Offline
          F Offline
          FeRtoll
          wrote on last edited by
          #4

          solved it... it was my fault! my function didnt fireing because of some crazy old code boolean! so if anyone ever need this the above sendmessage works fine for backspace! sorry guys :)

          FeRtoll Software.net ------------ E-Mail me WebPage

          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