Loop Through A List Of The Keys That Are Available In The 'Keys' Enumeration?
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
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
Aug 15, 2010
I am trying to creat a program to automate many of the things I do when I build a computer. I was attempting to do this via batch files but got stuck when I needed to search the registry for cetain keys and delete the parrent folder in which it resides in.
For instance: Installing a MS Loop Back Adapter I found a utility that works at the command promt called DEVCON that will allow me to install a MS Loop Back Adapter. I was doing this through a batch file but found that I can call the utility through VB and get the same result (of course I still need to have the DEVCON.exe)
[Code].....
View 14 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
Oct 27, 2009
Given the following vb.net class:
Friend Class PairCollection(Of TKey, TValue)
Inherits List(Of KeyValuePair(Of TKey, TValue))
Public Overloads Sub Add(ByVal key As TKey, ByVal value As TValue)
Me.Add(New KeyValuePair(Of TKey, TValue)(key, value))
End Sub
[Code]...
View 1 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
Jun 23, 2009
I need to get a list of registry keys. I have a key in HKEY_LOCAL_MACHINESOFTWARECBV
In there I have a couple of more keys that I need to list. After that I'll be able to get the subkeys easily.
I've looked and the only call that seems to do this is RegOpenKeyEx. Is there a better or more up to date method that I can use?
I've looked at My.Computer.Registry.LocalMachine and can only see methods to get the subkeys and not keys.
View 2 Replies
Nov 2, 2009
I need to sort a list (of person) to person.Age within person.Department. f I user personlist.sort with a comparer for Age and then sort again with a comparer for Department, the sequence of age is destroyed.
View 1 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
Jun 15, 2010
How can I sort data in a sorted list using values instead of keys from highest to lowest?[code]...
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
Aug 23, 2011
On a client i have an anonymous list containing a multi-column primary key previously selected from the DB.Then i need to select all the records from the DB that equals the primary key list i have stored in the memory.[code]
View 1 Replies
Feb 27, 2010
Can I use enumeration in a loop? something like this:
Enum Days As Integer
Monday = 1
Tuesday = 2
Wednesday = 3
End Enum
[Code]...
View 2 Replies
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
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