Test Foro de elhacker.net SMF 2.1

Programación => .NET (C#, VB.NET, ASP) => Programación General => Programación Visual Basic => Mensaje iniciado por: POLLITOXD en 13 Agosto 2013, 17:03 PM

Título: problemas con send key
Publicado por: POLLITOXD en 13 Agosto 2013, 17:03 PM
quiero saber cual seria la funcion o code para que la simulacion de botones
se active en el block de notas

osea cuando le doy empezar al form en el block quiero que salga las
las letras que quiero yo 
pero en ves que salga letras me sale numeros ascii
bueno sino me explique bien dejo un video aveces
vale una imagen para poder comprender mejor

[youtube=640,360] http://www.youtube.com/watch?v=12PR52wF-Fw[/youtube]

aca dejo el ejemplo del proyecto : cree 2 comandos, 2 text , 2 timer

Código (vb) [Seleccionar]
Option Explicit
Private Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As Integer

Private Sub Form_Load()
With Timer1
.Enabled = False
.Interval = 2000
End With
With Timer2
.Enabled = False
.Interval = 2000
End With
End Sub
Private Sub a()

    If Timer1.Enabled = False Then
        Timer1.Interval = CInt(Val(Text1.Text))
        Timer1.Enabled = True
        Command1.Caption = "Parar"
    Else
       Timer1.Enabled = False
       Command1.Caption = "Empezar"
    End If
End Sub

Private Sub s()
    If Timer2.Enabled = False Then
        Timer2.Interval = CInt(Val(Text2.Text))
        Timer2.Enabled = True
        Command2.Caption = "Parar"
    Else
       Timer2.Enabled = False
       Command2.Caption = "Empezar"
    End If
End Sub
Private Sub Command1_Click()
Call a
End Sub
Private Sub Command2_Click()
Call s
End Sub

Private Sub Timer1_Timer()
SendKeys (vbKeya)
End Sub
Private Sub Timer2_Timer()
SendKeys (vbKeys)
End SubE


Ojalas me `puedan ayudar por hay quise meter Chr$(KeyCode) pero
no se mucho de vb apenas toy empensando
Título: Re: problemas con send key
Publicado por: DarkMatrix en 14 Agosto 2013, 04:47 AM
call Sendkeys("a")
Título: Re: problemas con send key
Publicado por: Miseryk en 23 Agosto 2013, 12:24 PM
SendMessage, SendInput, etc.