C# :: ICSharpEditor And Accidental Hotkeys?
Sep 1, 2009
I seem to have a bit of a problem with the ICShartEditor text editor. It works fine for me in a Windows Forms app, except that if I have a button (or any other control) on the same form that defines a hotkey (like ALT-S for a Save button), then whenever I try to type 'S' in the text editor (or whatever the hotkey might be), then it triggers the hotkey rather than adding the character to the text.What appears to be happening under the hood is that all the ProcessMnemonic() methods for all controls of the form run, so those methods kick in and handle the keypress, which I would think should only happen if a key like the ALT-key is pressed.
View 1 Replies
ADVERTISEMENT
Jun 19, 2011
I'm having a problem with editing records in my DataSet. When adding a record to the database, I have a button that adds to the binding source
[code]...
View 1 Replies
May 13, 2008
possible to register 2 hotkeys? If so h
View 7 Replies
Oct 24, 2009
I'm writing a program where there's a toolbar at the top, and to hide the toolbar you click "Hide Toolbar", but I need to create a hotkey to make it come back.
View 14 Replies
Dec 9, 2011
I have a code to detect Flashdrive USB insert. It works, but how can I detect a disconnect? You can google for any code to detect usb flashdrive insert, it's easy, but how disconnect.I needed to have a hotkey for a button function. I made an insivible menustrip with the code with the hotkey. How can I make the hotkey work EVEN if I alt tab out of the program (As long as it runs background)?
View 5 Replies
Oct 21, 2010
I want to know how to use hotkeys outside my form, but I am terible in searching online, and I only find how to declare them, but not how to use them.
View 5 Replies
Aug 8, 2009
I'm trying to get hotkeys to work in my application (to make it visable if its minimized). I got it to work except that they only work once... the second time you try it does nothing.
here is the code i was using
Public Enum HotKeyModifiers As Integer
MOD_ALT = &H1
MOD_CONTROL = &H2
[Code].....
View 10 Replies
Oct 14, 2009
how I would make hotkeys e.g "ctrl + 1" to do an action even when the application ism't the active window.
for example I am working on photoshop and then i press ctrl + 1 and my app appears in front of it.
or if I press "ctrl+2" a new window will open.
I need this to also work when the application is hidden and in the system tray as well as when application is visible
View 6 Replies
Mar 25, 2010
Now my question is, is it possible to use Hotkeys and ScreenCapture in a Fullscreen game?If so, how?What im acutaly trying to do is a program to take a screenshot ingame (for some reason, this game doesnt have an option to take screenshots ingame.. Bad Company 2)
View 7 Replies
Dec 2, 2009
I have a program that locks the desktop when loaded and will only close if a username and password is entered.
the problem i am having is that once the user presses alt+tab or even the windows key the other apps are accessed.
how can i get my form to ignore any hotkey input.
View 4 Replies
May 25, 2009
I have been trying over the past few days to make a program sit open on the computer, waiting for a key press (which will be the hotkey). When the key is pressed, it will execute a peice of code and minimize itself. Im really sorry if this is too simple but im stumped over this one. I have searched google alot but no luck
So: I need to know how I can have the program 'monitoring' or 'looking for' a certain key press while it is doing something to tell it to stop, bearing in mind when the program actually starts it will minimise and stay minimised untill this hotkey is pressed that makes it maximise itself and stop the program.
View 1 Replies
Jul 12, 2011
How do I make hotkeys for buttons, which will activate it, like I pressed the button?
View 4 Replies
Feb 24, 2012
I've written a simple WAV player in VB 2010 - a Windows Form App with no menus. I'm trying to create a hotkey, like CTRL-D that would make a text box visible. Typing the correct password in the box will expand the form and show some Administrative functions. I'm having issues creating the hotkey with more than one key.I've got the following code, but it does not work. I do have KeyPreview set to True.
Private Sub _KeyDown(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
If e.KeyCode = Keys.Control And e.KeyCode = Keys.D Then
txtPWD.Visible = True
I've also tried
If e.Keycode = Keys.ControlKey & e.KeyCode = Keys.D
and many other variations including changing to ALT and SHIFT but nothing seems to work. If I remove one of the Keys, it works just fine.
View 1 Replies
Jun 9, 2010
I how how to register HotKeys for Keyboard but is it possible to do for a mouse?keyboard example - Registering Button "D"
RegisterHotKey(Me.Handle, 100, 0, Keys.D)How to register Left Mouse Button?
View 13 Replies
Apr 25, 2009
I'm trying to make a prank program that registers all of the letter keys on the keyboard and then will make random message boxes pop-up when you press certain ones, or just re-arrange the letters.But before adding any pranks, I'm trying to just get all of the hotkeys to work like a normal keyboard because when you register a key to be a hotkey, it no longer works for anything else. So registering "e" in the program will cause "e" to do nothing when your in notepad or something.
So far I've gotten pretty much everything to work except for this weird Shift bug. Whenever I press Shift and then a letter, the Sendkeys will correctly send the uppercase key, however as soon as I release shift and press a key without it, it still keeps the uppercase for one more letter.So if I press Shift + E then "E" will be successfully sent to Notepad, but then if I just press "b", "B" will be sent instead, but then after that first error it will successfully send lowercase again.
I was using wordlabel to store the letters so as to see if the shift uppercase problem was something in my coding, but actually when I press Shift + A and then just press a, it will do Aa in the label but AA in a program with the focus, like Notepad. So I don't know if this is a problem with Sendkeys or what but does anyone know of a solution?
View 1 Replies
Dec 8, 2009
How would I use "custom Hotkeys"? For example, if my textbox's text is F5, then how would I use GetAsyncKeyState to get "F5"?
View 9 Replies
Aug 24, 2010
If CheckBox_StartHotkey.Checked = True Then
If Not ComboBox_StartHotkey.Text = Nothing Then
Dim StartHotKey As Boolean
StartHotKey = GetAsyncKeyState(ComboBox_StartHotkey.Text)
If StartHotKey = True Then
StartActions()
[Code]...
I am trying to input the function key that a user has selected from a ComboBox (containing the function keys F1~F12 as options) into the GetAsyncKeyState(). However, since the ComboBox_StartHotkey.Text is a string, it cannot be converted into Long data type needed for the GetAsyncKeyState() function. I have tried Conversion and Parse Methods but what I try doesn't seem to work. Anyone know how to effectively convert a String (such as F6) into a Long data type for using in the GetAsyncKeyState() function in this case?
I used the tried to use the ItemData property to hold the Key Code representing the Function Key.
View 2 Replies
Jan 14, 2012
Using the code from this thread, I have been able to successfully register hotkeys for myself. I am having trouble though, I am trying to register a hotkey with the Control Constant; it doesn't seem to be working. I need to register Control + 1 (MOD_CTRL, Keys.D1). I know how to do this, yet I can't seem to get the MOD_CTRL constant to work. I've found that the constant for Control is &H11 but as I said previously, this does not seem to fire for either the left control or right control keys.
[Code]...
View 3 Replies
May 30, 2011
Currently I can not get my hotkeys to start and stop my program.Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As Integer and
[Code]...
View 1 Replies
Dec 19, 2010
I have a small app with one form (form1) which is supposed to be hidden until a hot key combo is pressed. I have read and taken sample code from: [URL]. I do have a keyboard class that hooks keyboard input, (I have my reasons) but it's odd that it will recognise the first hotkey and fire the event, but none after that? The problem is, I can make the form show, but not hide again. It will only recognise one shortcut, one time. How do I make it respond to another hotkey combo? Is the handle changing? Even with focus, the enabled form is not hiding again.
View 4 Replies
Apr 28, 2010
I would like to register a hotkeys/shortcut keys (e.g. Ctrl + Alt + A) and I would like to find out if other program is using it.
View 2 Replies
Apr 1, 2009
I was wondering on how i can make multiple global hotkeys and have them show message boxes just so i can learn and expand from there. Like have one be ctrl + alt + F1 and the other be ctrl + alt + F2.
View 1 Replies
Mar 26, 2012
Below is the section I'm having trouble with at the moment:
Friend Sub glbHooks_KeyPress(ByVal sender As Object, ByVal e As KeyPressEventArgs) Handles glbHooks.KeyPress
newStr = newStr & LCase(e.KeyChar)
[Code]....
Neither of these worked, though the 2nd one would clean up my code a bit. Unfortunately I'm getting an "Expression expected" error on that "newStr = If..." line. I know there's supposed to be a "Then" somewhere along it but I don't know where it's supposed to be and the poster hasn't gotten back to me on that yet.
View 2 Replies
Jul 27, 2011
I'm working on a project that contains hotkeys, but I don't wish to have global hotkeys. At the moment, I'm using KeyDown and e.KeyCode for hotkeys. I've created test projects where these worked perfectly fine, but on my main project, they don't register.
CODE:
View 2 Replies
Jun 5, 2011
1)I have saved some data in a text file, now I want to assign it a hotkey, so that when a user presses the hotkey (assigned by the user) that file data should be displayed in a text editor or email etc.
2) should I save the text file and hotkeys into database? if yes then how? I am totally new to program.
View 9 Replies
Jul 20, 2011
I have made a application that detects already saved hotkeys and data assigned to them, so now whenever I press the hotkey to send the assigned data to active window it does sends the data to active but it won't stop sending data...I am calling my function that reads data from the database in timer device and the function that detects the hotkey...
Here is my code
Private Sub Hot_Checker_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Hot_Checker.Tick
gKey.CheckBox()
'is the object that calls the function to check the pressed hotkey
keyTemp = gKey.getHkey()
[Code] .....
trying to find the main error that is causing this to happen, after pressing the hotkey my app won't stop sending the data to the active window. My app should wait for the next hotkey press rather than sending data.
View 4 Replies
Jun 4, 2008
I want to make hotkeys for my project, it needs hotkeys to complete. how to make hotkeys even if it now focused on form1.
View 3 Replies
Jun 27, 2010
I would like to make the user of my program able to change the hotkeys to what ever he wants..I tried to use the following code in a module and on MainForm load event RegisterHotKeys Sub will be executed..[code]
View 1 Replies
Jul 29, 2009
I am developing a form where the Mdiparent contains Mdichildren in tabbed style. so if user clicks on search form it appears as a tab in the main container form. Now, this child form that opens up as a tab in the main form has hotkeys defined. However, on pressing "Alt" while the control is in the child tabbed form, the clues i.e TextLabel with underlined hotkey alphabet does not appear in the child form. The hot keys work fine however the clues are not displayed on pressing Alt.
View 2 Replies
Nov 14, 2010
For sample. I do a 2 start button. Start and stop but I use hotkey to automatic start (my program will automatic press Tab and 1). When I press F9 will start and F10 to stop but when I'm in my program but my problem. When I click in notepad then I press F9 it won't work?
Here the code I used:
Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
If e.KeyCode = System.Windows.Forms.Keys.F10 Then
StartButton.PerformClick()
[Code] .....
View 1 Replies