Results 1 to 6 of 6
  1. #1
    Gasps Its Michael Jackson's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Heaven
    Posts
    114
    Reputation
    10
    Thanks
    41
    My Mood
    Confused

    [HELP] How do you make SendKeys work?

    I'm personally making a On-Screen Number Pad right now for users who use laptops. And when I debugged it, and tried it, it doesn't work! So I'm guessing I need to have a target process or something. But I don't know how! Help! Here's my code:

    [PHP]Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    Dim TargetProcess As Process() = Process.GetProcessesByName(TextBox1.Text)

    End Sub
    End Class[/PHP]

    That's the TargetProcess. Here's the Number Pad:

    [PHP]Public Class Form2

    Private Sub ExitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitToolStripMenuItem.Click

    End

    End Sub

    Private Sub AlwaysOnTopToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AlwaysOnTopToolStripMenuItem.Click

    If AlwaysOnTopToolStripMenuItem.Checked = True Then

    Me.TopMost = True

    Else

    Me.TopMost = False

    End If

    End Sub

    Private Sub Button0_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button0.Click

    SendKeys.SendWait(Keys.NumPad0)

    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

    SendKeys.SendWait(Keys.NumPad1)

    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

    SendKeys.SendWait(Keys.NumPad2)

    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click

    SendKeys.SendWait(Keys.NumPad3)

    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click

    SendKeys.SendWait(Keys.NumPad4)

    End Sub

    Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click

    SendKeys.SendWait(Keys.NumPad5)

    End Sub

    Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click

    SendKeys.SendWait(Keys.NumPad6)

    End Sub

    Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click

    SendKeys.SendWait(Keys.NumPad7)

    End Sub

    Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click

    SendKeys.SendWait(Keys.NumPad8)

    End Sub

    Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click

    SendKeys.SendWait(Keys.NumPad9)

    End Sub

    Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button10.Click

    SendKeys.SendWait(Keys.Divide)

    End Sub

    Private Sub Button11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button11.Click

    SendKeys.SendWait(Keys.Multiply)

    End Sub

    Private Sub Button12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button12.Click

    SendKeys.SendWait(Keys.Decimal)

    End Sub

    Private Sub Button13_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button13.Click

    SendKeys.SendWait(Keys.Enter)

    End Sub

    Private Sub Button14_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button14.Click

    SendKeys.SendWait(Keys.Add)

    End Sub

    Private Sub Button15_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button15.Click

    SendKeys.SendWait(Keys.Subtract)

    End Sub
    End Class[/PHP]

    Help!
    Quote Originally Posted by Post Ranks
    Leecher 0
    Newbie 50
    Member 100

    Advanced Member 150
    H4X0R Member 250
    Dual-Keyboard Member 500
    Expert Member 750
    Bobo's Trainer 1,000
    MPGH Expert 1,250
    Synthetic Hacker 1,500
    Blackhat Hacker 2,000
    Whitehat Hacker 2,500
    Bobo's Guardian 3,000
    Upcoming MPGHiean 3,500
    MPGH Addict 4,000
    MPGHiean 4,500
    MPGH Knight 5,000
    MPGH Lord 5,500
    MPGH Champion 6,000
    MPGH King 6,500
    MPGH Legend 7,000
    MPGH God 7,500
    MPGH God II 8,000
    MPGH God III 8,500
    MPGH God IV 9,000
    MPGH God V 9,500
    Arun's Slave 10,000
    Dave's Slave 10,500







  2. #2
    D e a t h h a u n t S's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    On the Mpgh Server hidden between microchips but Shh..!!
    Posts
    525
    Reputation
    22
    Thanks
    146
    My Mood
    Relaxed
    Wouldn't it just be easier to make a timer for each button lets say we have button1 and timer1 heres how it could be:

    button1:
    Timer1.start

    Timer1:
    sendkeys.send("1")

    then for the rest of the buttons just replace the 1 with whatever eg:

    sendkeys.send("/") // divide
    sendkeys.send("+") // add
    sendkeys.send("*") // multiply
    sendkeys.send(".") // decimal

    ECT ECT ..

    wouldn't that just be easier?


    edit: SHIT SORRY FOR BUMP didn't realize date, this guy needed help though :/ sorry .. should i delete this post?
    Last edited by D e a t h h a u n t S; 08-25-2010 at 09:53 PM.


    Make a little side money for yourself here

    My Injector



    Don't say shit if you don't know shit


    Big Respect for: Aeroman R3dLine Flash and Wizdom-x







  3. #3
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    /moved to vb section.

    Have fun guys


     


     


     



    The Most complete application MPGH will ever offer - 68%




  4. #4
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    Why would you want to send those keys btw?

    Sendkeys isn't working in Games btw.



  5. #5
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,676
    My Mood
    Mellow
    Quote Originally Posted by NextGen1 View Post
    /moved to vb section.

    Have fun guys
    Uh it was a 3 week bump. Ohsnap.

    Quote Originally Posted by Blubb1337 View Post
    Why would you want to send those keys btw?

    Sendkeys isn't working in Games btw.
    I think his problem was sending the keys to a target process, because it's an on-screen keyboard you have to have that formed focused to click the keys, so that means it will only send the keys to the "keyboard form", essentially useless. He needs to know how to send the keystroke to an open process.
    Last edited by Jason; 08-26-2010 at 01:09 AM.

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)

  6. #6
    'Bruno's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Portugal
    Posts
    2,883
    Reputation
    290
    Thanks
    1,036
    My Mood
    Busy
    I made a C# project which had a touch screen keyboard, back in that time (was at school), i was working with MDI, and i was focusing the last write-able control that was selected, and then executed send keys.

    About sending it to another application.. well.. you can always try Postmessage/Sendmessage...

    Or before the Sendkeys.Send() code, find the process hwnd and use SetForegroundScreen(), plus to send keystrokes.. sendkeys won't work (i think j-deezy said that already), so use another API.

    Edit: although it's an old topic, it might be useful for someone else with the same problem. (Anyway they never use search)
    Last edited by 'Bruno; 08-26-2010 at 01:47 AM.
    Light travels faster than sound. That's why most people seem bright until you hear them speak.

Similar Threads

  1. [Help] How do you make a textbox show as *? Like for a password box in VB
    By Gasps Its Michael Jackson in forum Programming Tutorials
    Replies: 10
    Last Post: 09-01-2010, 10:06 AM
  2. [HELP] How do you make SendKeys work?
    By Gasps Its Michael Jackson in forum Visual Basic Programming
    Replies: 4
    Last Post: 07-30-2010, 02:04 PM
  3. how do you make weapon mods work?
    By cyeo1 in forum Combat Arms Mod Discussion
    Replies: 2
    Last Post: 07-18-2010, 02:51 PM
  4. [HELP] How would you make a G36E, into a M417 Combat, being that they have differnt m
    By hellohigoodbye in forum Combat Arms Mods & Rez Modding
    Replies: 1
    Last Post: 12-16-2009, 06:01 PM
  5. [Help] How do you get DDD555 aimbot to work with Xfire chams?
    By HAPPYxHACKING in forum Combat Arms Hacks & Cheats
    Replies: 1
    Last Post: 07-22-2009, 06:53 PM