what i have to do if i want to do a commbact a key on key board
Printable View
what i have to do if i want to do a commbact a key on key board
commbact ? what does it mean
Command that i mean
command is sendkey {13}
this is used for enter key
for other search keyascii
sendkey not sendkeys with s ok
and where i have to write it?
if u need it at button click than in click event, when u will press button it will press enter key, what u want to make ?
noQuote:
if u need it at button click than in click event, when u will press button it will press enter key, what u want to make ?
pressing one key on keyboard do the code automatically
draw a text box and timer
set the time inteverl to 2
than write this code in timer
Private Sub Timer1_Timer()
text1.setfocus
SendKeys "a"
sendkeys "b"
sendkyes "c"
End Sub
draw a text box and timer
set the time inteverl to 2
than write this code in timer
Private Sub Timer1_Timer()
text1.setfocus
SendKeys "a"
sendkeys "b"
sendkyes "c"
End Sub
and how i will programe them
and how i will progremme them?
its visual basic ... double click on timer
than write code from text1.setfoucs to sendkeys "c"
you can do an example? plz
how to send u file ?
work ?
it works but it isn't that i want to do i don't want that
i want just to press a button and do one code that only that
click text box and press enter
it will snd you msg your command
work ?
this think can de done with this thinks +-=/*?
yes see keyascii chart for key code
if i want to have combination of keys
what i have to do?
Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Option Explicit
Private Const VK_CONTROL = &H11
Private Const VK_C = &H43
Private Const VK_A = &H41
Private Const KEYEVENTF_KEYUP = &H2
Private Sub Timer1_Timer()
keybd_event VK_CONTROL, 0, 0, 0
keybd_event VK_A, 1, 0, 0
End Sub
this pres ctrl a for other keys change key
ie the control and sift the program will make the combinatio
i want press sift and 8 the programme will take the ADD
i think i have helped you to understand
u want to pres "+" this key rit ?
yes but my comouter is mini and i dont have the keys next to main key board
if u r doing it bcoz of ur keybord then use virtual keybord to type
can write all letters of world pleaze
world keys ? what
bcoz can you explian please
i want to replace one button with one key where i have to write it?
plz clear ur question its confusing
i want to replace a dutton in form with a key on keyboard
where i have to write the code
ok u want to press enter suppose and change the color ... like this ?
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Sub Timer1_Timer()
Dim KeyNumber As Integer
For KeyNumber = 1 To 132
If GetAsyncKeyState(13) < 0 Then
SendKeys "{+}"
End If
Next
end sub
press enter
set interval 100
it will wirte " + " when u will press enter
inteveral = 1
not 100
Quote:
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Sub Timer1_Timer()
Dim KeyNumber As Integer
For KeyNumber = 1 To 132
If GetAsyncKeyState(13) < 0 Then
SendKeys "{+}"
End If
Next
end sub
press enter
set interval 100
it will wirte " + " when u will press enter
i want to do the option
option for wat ? explain wat u want more its confusing
i want to replace a button of form not to write to a text and puss eg the enter key of key board
think i am understandable
entery key should do wat ? if u press button enter key should be press of key board ?
which language do u speak ?
i think if say you my language you will never talk me again
but i say you greek
what language u speak ?
GREEK
i am from greece
θέλετε να αντικαταστήσετε το κουμπί με το πλήκτρο enter ?
did u understand ?, n why would i not speak to u wats bad in ur languge ?
yes
and you are from greece or somewhere else
m form somewhere else , ok write your question in greek in detail
γράψτε την ερώτησή σας στην ελληνική λεπτομερώς
Post 49 is as equally clear to me as all the other posts.
That's a worry.
καλά εσείς το ζητήσατε όχι εγώ, οπότε ξεκινάω
θέλω ένα κουμπί του πληκτρολογίου πχ το + όταν πατιέται να κάνει ακριβώς το ίδιο πράγμα με το κουμπί οπτικό κουμπί της visual basic
αυτό και μόνο
sory understood a bit , well u want to press + button on keyboard and do what ? what result u want by pressing + key m asking that
τι αποτέλεσμα που θέλετε πατώντας + πλήκτρο
Code:Private Sub cmdADD_Click()
num1 = SCREEN1.Text
SCREEN1.Text = ""
op = "+"
End Sub
that
u want to make a add button rit ?
i can do that with enter key
do it
Dim KeyNumber As Integer
For KeyNumber = 1 To 132
If GetAsyncKeyState(13) < 0 Then
text1.text=text2.text+ val (text3.text)
End If
Next
make 3 box , write value in 2 and press button the answer will be in textbox 1
for this where i have to write itCode:Dim op As String
Dim num1 As Double
Dim num2 As Double
Private Sub cmd0_Click()
SCREEN1.Text = SCREEN1.Text & "0"
End Sub
Private Sub cmd1_Click()
SCREEN1.Text = SCREEN1.Text & "1"
End Sub
Private Sub cmd2_Click()
SCREEN1.Text = SCREEN1.Text & "2"
End Sub
Private Sub cmd3_Click()
SCREEN1.Text = SCREEN1.Text & "3"
End Sub
Private Sub cmd4_Click()
SCREEN1.Text = SCREEN1.Text & "4"
End Sub
Private Sub cmd5_Click()
SCREEN1.Text = SCREEN1.Text & "5"
End Sub
Private Sub cmd6_Click()
SCREEN1.Text = SCREEN1.Text & "6"
End Sub
Private Sub cmd7_Click()
SCREEN1.Text = SCREEN1.Text & "7"
End Sub
Private Sub cmd8_Click()
SCREEN1.Text = SCREEN1.Text & "8"
End Sub
Private Sub cmd9_Click()
SCREEN1.Text = SCREEN1.Text & "9"
End Sub
Private Sub cmdADD_Click()
num1 = SCREEN1.Text
SCREEN1.Text = ""
op = "+"
End Sub
Private Sub cmdCLEAR_Click()
SCREEN1.Text = ""
End Sub
Private Sub cmddie_Click(Index As Integer)
num1 = SCREEN1.Text
SCREEN1.Text = ""
op = "/"
End Sub
Private Sub cmddin_Click()
num1 = SCREEN1.Text
op = "^"
End Sub
Private Sub cmdison_Click()
num2 = SCREEN1.Text
SCREEN1.Text = ""
If op = "+" Then
SCREEN1.Text = num1 + num2
ElseIf op = "-" Then
SCREEN1.Text = num1 - num2
ElseIf op = "x" Then
SCREEN1.Text = num1 * num2
ElseIf op = "/" Then
SCREEN1.Text = num1 / num2
ElseIf op = "^" Then
SCREEN1.Text = num1 ^ 2
End If
End Sub
Private Sub cmdkoma_Click()
If SCREEN1.Text = "" Then
SCREEN1.Text = SCREEN1.Text & "0,"
ElseIf Not SCREEN1.Text = "" Then
SCREEN1.Text = SCREEN1.Text & ","
End If
End Sub
Private Sub cmdmion_Click()
If SCREEN1.Text = "" Then
SCREEN1.Text = SCREEN1.Text & "-"
ElseIf Not SCREEN1.Text = "" Then
num1 = SCREEN1.Text
SCREEN1.Text = ""
op = "-"
End If
End Sub
Private Sub cmdpolap_Click(Index As Integer)
num1 = SCREEN1.Text
SCREEN1.Text = ""
op = "x"
End Sub
it cant be done this way for this code