Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

Bindovanje + Timer

[es] :: Visual Basic 6 :: Bindovanje + Timer

[ Pregleda: 1854 | Odgovora: 1 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

undeR.
Nikola Ranisavljev
Student
Grocka

Član broj: 294729
Poruke: 4
*.dynamic.isp.telekom.rs.



Profil

icon Bindovanje + Timer04.12.2011. u 16:41 - pre 150 meseci
Pozdrav, radim key binder i resio sam stari problem, sad je u pitanju novi, sada sam namestio sve lepo da ucitava i save podatke, sada mi je problem to sto kad kliknem broj on spamuje, ili kada klknem numpad 1(gde je namesteno) on otkuca "1" pa ono sto sam upisao u textbox1.text napise

Code:
Public Class Form1
    <DllImport("user32.dll")> _
    Public Shared Function GetAsyncKeyState(ByVal vKey As Int32) As Short
    End Function

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

        Timer1.Enabled = True
        Timer1.Interval = 1

    End Sub

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        Dim n0 As Integer = 0
        Dim n1 As Integer = 0
        Dim n2 As Integer = 0
        Dim n3 As Integer = 0
        Dim n4 As Integer = 0
        Dim n5 As Integer = 0
        Dim n6 As Integer = 0
        Dim n7 As Integer = 0
        Dim n8 As Integer = 0
        Dim n9 As Integer = 0

        n0 = GetAsyncKeyState(Keys.NumPad0)
        n1 = GetAsyncKeyState(Keys.NumPad1)
        n2 = GetAsyncKeyState(Keys.NumPad2)
        n3 = GetAsyncKeyState(Keys.NumPad3)
        n4 = GetAsyncKeyState(Keys.NumPad4)
        n5 = GetAsyncKeyState(Keys.NumPad5)
        n6 = GetAsyncKeyState(Keys.NumPad6)
        n7 = GetAsyncKeyState(Keys.NumPad7)
        n8 = GetAsyncKeyState(Keys.NumPad8)
        n9 = GetAsyncKeyState(Keys.NumPad9)

        If n1 = -32768 Then
            SendKeys.Send(TextBox1.Text)
            SendKeys.Send("{enter}")
        ElseIf n2 = -32768 Then
            SendKeys.Send(TextBox2.Text)
            SendKeys.Send("{enter}")
        End If
        If n3 = -32768 Then
            SendKeys.Send(TextBox3.Text)
            SendKeys.Send("{enter}")
        ElseIf n4 = -32768 Then
            SendKeys.Send(TextBox4.Text)
            SendKeys.Send("{enter}")
        End If
        If n5 = -32768 Then
            SendKeys.Send(TextBox5.Text)
            SendKeys.Send("{enter}")
        ElseIf n6 = -32768 Then
            SendKeys.Send(TextBox6.Text)
            SendKeys.Send("{enter}")
        End If
        If n7 = -32768 Then
            SendKeys.Send(TextBox7.Text)
            SendKeys.Send("{enter}")
        ElseIf n8 = -32768 Then
            SendKeys.Send(TextBox8.Text)
            SendKeys.Send("{enter}")
        End If
        If n9 = -32768 Then
            SendKeys.Send(TextBox9.Text)
            SendKeys.Send("{enter}")
        ElseIf n0 = -32768 Then
            SendKeys.Send(TextBox10.Text)
            SendKeys.Send("{enter}")
        End If
    End Sub
 
Odgovor na temu

shpiki
Student
Novi Sad

Član broj: 50342
Poruke: 1651



+62 Profil

icon Re: Bindovanje + Timer04.12.2011. u 22:42 - pre 150 meseci
Ajd' polako, sta si hteo da kazes? Jel moze to malo razumnije, pa malo interpunkcijskih znakova, malo smislenijih recenica, itd?
There are only 10 types of people in the world:
those who understand binary, and those who don't.
 
Odgovor na temu

[es] :: Visual Basic 6 :: Bindovanje + Timer

[ Pregleda: 1854 | Odgovora: 1 ] > FB > Twit

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.