Way To Use Keys
Nov 5, 2009
I'm trying to do is control an rc car from my pc and I'm trying to do this through an interface board I have. I have code below where I have started the design but I'm trying to figure out how to take inputs from the arrow keys which I cant figure out, I've just tried to set up a test by changing the colour of labels but it's not working, can anyone see my error? Please excuse any foolish newbie mistakes.[code]...
View 39 Replies
ADVERTISEMENT
Oct 21, 2008
I have a problem detecting whether one of the arrow keys is pressed, all the other keys seem to be detected apart from the arrow keys??? I have set key preview to True........ It detects the arrrow keys BUT ONLY if I have NO other controls on the form??? example..
Me.Text = e.keycode
It works, but then if I add a button for example, it stops.
View 3 Replies
Jun 25, 2011
just wondering how i could give my auto typer hot keys, for example they press f1 to start the typer f2 to stop it.
[Code]...
View 4 Replies
Mar 25, 2011
I'm trying to create a shortcut which expands or collapses my treeview using the ctrl+alt+up-arrow or ctrl+alt+down-arrow:
If Keys.ControlKey And e.KeyCode = Keys.Alt And e.KeyCode = Keys.Down Then
mytreeview.ExpandAll()
End If
[code].....
View 2 Replies
Jan 13, 2011
How could I loop through a list of the keys that are available in the 'Keys' enumeration? It seems like it should be something easy to do, but I'm not having any luck finding a collection that I can loop through.
View 6 Replies
May 23, 2010
So I found this little morpg. The game is fun but really repetitive. I would like to simplify some of the tasks in the game. I do not know how to start this project. How can I recored arrow keys and then tell the computer to enter the arrow keys? One of the objectives in the game is to run around a farm 2x and scare away any wolfs. So the commands would be "arrow key up" for 30sec and then "arrow key right" for 4 sec and repeat. I have worked with robots in real life for some time. We would fill arrays with such instructions. One of the most fun things to program! But I have no idea how to do this in VB.
View 12 Replies
Feb 28, 2010
I need to capture the left and right arrow keys in Form1.KeyDown event so I can use them as hot keys. Instead they seem to be assigned to tab order (move focus to previous/next control) and the KeyDown event never gets called. How can I remove the arrow keys from tab order and use them for my hot keys instead?
View 2 Replies
Jan 2, 2012
I tried a couple of the send keys and they will not send any keys at all. I need a true Space bar input (SendKeys does not work for me). Also, I would like this to work on 32 and 64 bit computers. Let me know if you know of any good examples. I would love to have the ability to send a string in the future, but I can add that feature myself. [code]
View 2 Replies
Dec 7, 2009
I'm trying to disable these keys to prevent that user close form:
Private Sub frm_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
If e.KeyCode = Keys.F4 And e.Modifiers = Keys.Alt Then
e.Handled = True
End If
End Sub
But not runs.
View 8 Replies
Jan 23, 2010
I've tried various things but i can't seem to figure out how to get all the keys in a folder of the registry[code]...
View 1 Replies
Mar 7, 2012
I need to store the value of ItemCode at coloumn 0 of my ListView.Using the following code in click event, it worksvrEditProductCode = lvVendors.SelectedItems.Item(0).SubItems.Item(0).TextBut the same code in selectedindex changed event is causing an index out of range exception.Please advise how to fix it. I want user to get this value when up/down arrow key is pressed.
View 2 Replies
Jul 7, 2009
I am looking for a way to send keys to another app. I did create the other app and know all the controls it has. I have seen code using vb6 to change the caption another app and think it was also able to change the text/caption for controls on that form.
View 4 Replies
Dec 18, 2010
I want to change the "a" and "d" to key controls left and right perspectively. and I am having some trouble wiht the key up event. KeyChar works for KeyDown (after I forced it to) but not for KeyUp (even though they share the same things). I finally figured out how to get the picturebox to change its picture, but now I am stuck at this part. getting an animation in, and when im done moving, get the animation back to the idle picture. im also having a little bit of trouble with movement. pictre - as a split second of movement and (space) as a split second of not moving, when i begin moving, lets say it goes this way (there is a space right after the first -, so that was a split second that it stopped and then started continuously started moving again). how can i make it so it goes nice and fluid once you start moving? also, if i were to press any single key while holding A or D down, it either stops and i have to press the key again to move it move or, it goes in the other direction(if I hit a then d, or d then a). and in the key up event, id like it so when the a (or d) key is up, it goes back to the stand animation, and when moving, it goes to the moving animation. [code]
View 12 Replies
May 2, 2012
I want to use SendKeys, but only on itself, so if i minimize my program, I don't want it to send keys to other programs, but I want it to continue sending the keys to just itself
is there a way to target an application (self), or form or container or something?
View 6 Replies
Aug 23, 2011
I use the up arrow means , it must goto the previous text box and if i use the down arrow means , it must goto the next text boxes. Totally i m used 15 textboxes. From text box1 onwards, if i use the down arrow means goto the next textboxes and also repeated to all text boxes.(1 to 15) From text box15 onwards, if i use the up arrow means goto the previous textboxes and also repeated to all text boxes. (15 to 1)Nithiyanantham
View 5 Replies
Feb 29, 2012
I want to disable and ' in a ritch text box using the keydown event but i can't find the keys of these two characters.
View 3 Replies
Jan 7, 2011
I cannot capture the function keys F1..F12 for my application. I am able to capture regular keys and modifiers such as shift, ctrl, alt, etc.This question recommends KeyPreview = True, however that does not seem to work for my application. What am I doing wrong?
[Code]...
View 2 Replies
Oct 1, 2009
I have an image viewer application which consists of a Panel with a picture box on it. I want to use the arrow keys to iterate through the images in a folder. I have programed other keyboard shortcuts and all of them work except for the arrow keys, my program does not even acknowledge the KeyDown or KeyPress Event with the arrow keys. [code] As I said, all key events will fire the KeyDown with exception of the arrow keys.I have tried the Keypress event also and had the same problem
View 3 Replies
Jul 30, 2011
I'm making a key mapper in VB 2010, trying to capture keys pressed in the input box (tab, escape, backspace, space, caps, shift, ctrl, mwheelup, mwheeldown etc... non-alphanumeric keys).
View 1 Replies
Aug 7, 2010
I am using the RichTextBox Keydown event in Windows Vista, Visual Studio 2010 to detect when key combinations are pressed, and it works great, with one simple exception:Case Keys.Alt ' Does not work! Everything else works fine.
HTML
Private Sub RichTextBoxPrintCtrl0_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles RichTextBoxPrintCtrl0.KeyDown
Dim high As Integer
[code].....
View 5 Replies
Jun 21, 2010
I have the following code which works pretty fine with Listview. But I would like to use it with computer keyboard up/down arrow keys. How to modify the following code?
CODE:
View 8 Replies
Feb 24, 2012
How can i count keys pressed within ex. 1 min? Or how do i count a spesific key?
View 1 Replies
Nov 15, 2011
I am making a fake virus program as a joke and would like to know how to disable all of the keys except for the shift and enter keys.(these will exit the program)
View 1 Replies
Apr 3, 2012
I have a problem in my form I am trying to stop my form from being submitted or closed
I have 2 buttons accept btn and cancel btn whenever the user pres enter or ESC the form is closing I tried everything from key press to key down and nothing works,
View 11 Replies
Dec 12, 2010
I would like to turn on an app in the background that disables or temporarily remaps all but the alphanumeric keys while they are using my laptop if possible.
View 1 Replies
Feb 27, 2009
I need to disable keys using a form, when pressing a button, searching in the forum, I found this:
If (e.Alt = True) Then
If (e.KeyData = Keys.F4) Then
e.Handled = True
End If
End If
but I can't get it to work, is there a way to disable keys?I need to disable a, s, d , f keys?
View 4 Replies
Sep 8, 2008
is there a way to disable keys on a keyboard?
like the windows key?
View 9 Replies
Jun 13, 2012
I am trying to list all printers for all users by listing the registry key info
I get errors "object variable or with block variable not set " [code]...
View 7 Replies
Mar 8, 2012
I want to get all sub keys in a reg location. This entry can also have additional sub keys.At location "HKEY_CLASSES_ROOTexefile" this key as 3 subkeys and 2 of these keys have additional sub keys under them. I need to get all the keys and any additional sub keys under each key if there is any. This code will be used for other keys, so I can not assume they have subkeys.
Dim Key As RegistryKey = Registry.ClassesRoot.OpenSubKey("exefile", False)
Dim SubKeyNames() As String = Key.GetSubKeyNames()
Dim Index As Integer
[code]....
View 2 Replies
May 2, 2011
i have a game with a moving sprite and it goes foward left back and right. i cant quite figure out how to get the object to accept two different keys at once and move in that direction in the code. ill attach my code,
[Code]...
View 1 Replies