how one would be able to detect what keys are pressed. The problem is i want this done while my application is running in the background. There are alot of examples of doing it when yu are is what you are busy with. My scenario. I have an app process running in the background hidden. The when i press ctrl and t as an example i would like my form displayed.
I have been searching the forums but I keep finding ways to cause events to occur when a key is pressed. I'm trying to get a true/false if the "ctrl" + "L" keys are pressed when the form loads so it know whether to show itself or close
im working on a little app for my self, to make my life a little more convenient. I have some media keys on my laptop, and I would like to use them with itunes while it is minimized. I found a app that did it for me a long time ago, but cant seem to find it now. But I would like to try my hand at my own, and I've managed to do so, but, my app has to be in focus for it to work. is there any way to still detect when these media keys are pressed while my app is out of focus?
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.
What I'm trying to do here is load data into the clipboard and then wait until the user pastes the data before clearing and entering more data into the clipboard.Here's a snipet:
Code: Clipboard.Clear() Clipboard.SetText("TEST #1") 'Wait until user hits Ctrl+V
[code]....
Is there a way to pause execution of the code until the user hits Ctrl+V?
I have an application that the main screen currently has all exit functionality removed by use of a class. I want a certain key combination to exit the program, but cannot figure out how to do this. I.E. Ctrl + X.
How to disable all combination key of windows, I managed to disable taskmanager and altf4, however failed to find disable all windows keys, alt esc. alt space and etc. I don't have any API background.
I am wondering on how to write the code such that the program will respond when 2 arrow keys are pressed at the same time. In other words, I would like to have the program to behave like a racing game.
vb.net Private Sub MainWindow_PreviewKeyDown(ByVal sender As Object, ByVal e As System.Windows.Input.KeyEventArgs) Handles Me.PreviewKeyDown If Keyboard.IsKeyDown(Key.A) AndAlso Keyboard.IsKeyDown(Key.LeftCtrl) AndAlso
[Code].....
How can I call my Button1.Click event on the 3 keys being pressed???
All i wish to do is have some simple code, which can detect when the esc key is pressed, (if possible can you point out where i need to change to set it for an other key).
I have a webform and i want to detect if F5 button was pressed or if the page was refreshed. I know about postback but it is not what i'm looking for. I have a gridview that loads in a modal popup when a button is clicked and a parameter's value is set for the gridview. When refresh is hit and if the modal popup button was previously clicked the modal popup is visible right after refresh. I want to detect if the page is refreshed to prevent this. any ideas? I thought to try Override but I'm not exactly sure how to use it. I tried Control.ModifierKeys but I don't have access to ModifierKeys.
I am trying to detect combination of Ctrl+Shift+Alt and show them in a textbox ....Here is my code
[Code]...
these expressions detects the keys? I was able to detect two keys any of the above mention like Ctrl+shift or Ctrl+Alt and vice versa with the same expressions, but why can't these expressions or piece of code can't detect three keys/combination of three?
by defauld the usercontrol can't detect the directions(arrows) keys and other special keys(using the keydown event). but using an function i can resolve the problem:
Protected Overrides Function IsInputKey(ByVal keyData As System.Windows.Forms.Keys) As Boolean 'Need to trap the following input combinations to prevent the(UserControl) 'from losing focus:
I want to detect up,down arrow keys while in edit mode of datagrid view i use the code below but it is not working?
Public Overridable Function EditingControlWantsInputKey(ByVal keyData As System.Windows.Forms.Keys, ByVal dataGridViewWantsInputKey As Boolean) As Boolean Select Case keyData And Keys.KeyCode
[code]....
Both case arrow keys are not detected. please tell how to detect
I am using the media player control in my VB2010 project and hit a problem. I want to detect when a user has pressed the "next " button on the media player console.I can use the following code to detect the pause, play, fast forward, etc but I do not see anything that will detect when the "next" button is pressed.
How can I set a button, so that when it is pressed, it stays in the pressed down graphic state. Then when pressed again it returns to the normal not-pressed visual.Make a button stay like this until pressed again: url....
I have a TextBox and set the MiltiLine property to true and AcceptsTab property to false.When the TextBox has focus and i press Tab it works fine and the next control get the focus, but when i press Ctrl+Tab it works as if AcceptsTab property is set to true and makes a tab character into the TextBox.The reason i press Ctrl+Tab.. when switching between forms in my MDI application.Now how to make a Ctrl+Tab when pressed works like Tab when pressed in a MultiLine TextBox?