Need help with something

Discussion in 'Programming General' started by O Glitch O, Aug 23, 2008.

Need help with something
  1. Unread #1 - Aug 23, 2008 at 6:34 PM
  2. O Glitch O
    Joined:
    Aug 14, 2008
    Posts:
    347
    Referrals:
    0
    Sythe Gold:
    0

    O Glitch O Forum Addict

    Need help with something

    I need help with a program to where i press a button and it types text.

    And help will be appreciated greatly :)
     
  3. Unread #2 - Aug 23, 2008 at 6:39 PM
  4. Nullware
    Joined:
    Jan 30, 2007
    Posts:
    1,761
    Referrals:
    4
    Sythe Gold:
    0

    Nullware Guru

    Need help with something

    Have on your form a button named Command1 and a textbox named Text1.
    Code:
    Private Sub Command1_Click()
    Text1.Text = "" 'Set the textbox to empty
    Text1.SetFocus 'Give the textbox focus so we can type in it
    SendKeys "Hi" 'Type into the textbox
    End Sub
    
    There are a few other "better" ways of accomplishing this but they require complicated things such as APIs and Hwnds therefore I felt it best not to complicate things for you at the beginning. Hopefully you understand this and keep going further. :)
     
  5. Unread #3 - Aug 23, 2008 at 7:46 PM
  6. O Glitch O
    Joined:
    Aug 14, 2008
    Posts:
    347
    Referrals:
    0
    Sythe Gold:
    0

    O Glitch O Forum Addict

    Need help with something

    Thanks!
     
< really old vb program i found on my hard drive | [C# Snippet] Trajectory example >

Users viewing this thread
1 guest


 
 
Adblock breaks this site