GetAsyncKeyState - Make A Program That Only Listens To A Few Keys That The User Presses?
Dec 15, 2009
im trying to make a program that only listens to a few keys that the user presses, and if one of them is pressed, it carries out a specified command.for example, right now,i found a keylogger that could carry out my command, but id rather use something else if possible. right now, i have a timer running this:
For i = 1 To 255
result = 0
result = GetAsyncKeyState(i)[code]....
Then, in the textbox1_textchanged, i search for like if textbox1.text.contains("M") or something.problem with this, is im pretty sure its a keylogger, and i dont want to have to have that. also, it does not work in vista.
Found a solution! (should have researched more throughly!)
Option Strict On
Imports System.Runtime.InteropServices[code].....
View 1 Replies
ADVERTISEMENT
Apr 17, 2009
i want to make a message box appear when the user presses Alt k (then) Alt e (then) alt j . is this the correct code to use?:
Private Sub form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt3.KeyDown
Dim intcount As Integer = 0
If e.Alt And e.KeyCode.ToString = "k" Then
intcount = intcount + 1
[code]....
View 5 Replies
Mar 9, 2009
how to make an event happen when user presses a key ... let's say space or whichever...and the other thing - how to display a folder on my hard disk ("E:Music") in a ListView box in my program?
View 7 Replies
Nov 13, 2011
I have an assignment from school where the program is supposed to close when the user presses Alt X.
I have done this using Java but that was a long time ago and I can't remember how I did it. How do you do it in VB?[code]...
View 5 Replies
Oct 1, 2011
i'd like to know how to make an event happen when user presses a key ... let's say space or whichever...and the other thing - how to display a folder on my hard disk ("E:Music") in a ListView box in my program?
View 1 Replies
Oct 23, 2005
how to send e-mail?I don't know what's the code for send e-mail. Can anyone teach me how to?I have a button on the Menu Tool. I want when user presses that button, it will directly link to the Microsoft Office to send e-mail to me.Please teach me.By the way, I also want to know how to load a text file. I want to make another button on the menu tool so when user presses it, a text file will pop up.
View 18 Replies
Apr 20, 2011
Is it possible to make an app (with VB.NET or any other language) that actually listens to real FM? not internet radio, or XM Radio, or any of that, but actual (Signal) FM radio, the type you listen to in a car or with a radio? if it's possible, is there any special hardware that's needed? I mean, if i wanna make it will all the consumers be able to run it? or only a selected few? Im sorry if this question is too long...
And is radio dead now or is that what people say? Am i the only one that stil listens to radio?
View 2 Replies
Mar 19, 2009
My goal is to create a program that just listens (no locking, no blocking, just listens) to a range of UDP ports (coming in via the internet) on my local machine and copies the traffic to a richtextbox.I have various programs that say they use the ports and I simply want to listen to what the ports have going through them, I need to make sure that the messages are still processed by the applications that they are supposed to be as well.I will NOT be sending anything. Here is the code I have so far, and yes I know I only have it on one port for now. Figured get one to work then worry bout the rest!
Option Explicit On
Option Strict On
Public Class Form1[code]..........
I have recorded as using this port is running and receiving messages...
View 1 Replies
Jul 23, 2009
I'm working on a small project that will take Screen shot in several modes, the big problem that I'm facing currently is that I don't know how to capture the user keys will my application is minimized or when it's not the active window, i must do so if i want to let the user capture anything without having my application hiding the object (window) he want to its screen shot.
View 2 Replies
Dec 9, 2011
I am trying to make a application that will bind User Desired Keys to User Desired Text. This is what I have done so far, it is not very much but it keeps crashing and visual basic is not telling me anything is wrong with it. I basically just want the user to be able to select a hotkey from a combobox. [code]
View 3 Replies
May 2, 2010
Is there a way to make it so if you pressed a button for example, it would "press" the enter key or something similar.
View 14 Replies
Mar 21, 2012
I cant make my auto clicker on hotkeys, i tried this[code]...
View 2 Replies
Feb 17, 2011
I'm trying to work out how to detect if the user has pressed an f key I have this so far:
Private Sub Form1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Me.KeyPress
Label1.Text = e.KeyChar
End Sub
This detects when the user presses a character key and outputs it via Label1.text, but it doesnt work on all keys?
View 6 Replies
Nov 22, 2010
I am writing a function that should sound a beep every two seconds until the user either clicks the mouse or presses any key. The code I have written appears to work for the mouse click, but it ignores keystrokes:
[Code]...
View 16 Replies
Jun 17, 2011
I made a tic tac toe game. and i was wondering how would code it so that when a user presses a button or when a user wins it makes a beep or some kind of music
View 6 Replies
Jul 29, 2010
I want to create a registry entry when the user presses Alt F6 F6
Could someone give me an example of house to do this?
I'm playing with this code
[code]...
View 3 Replies
Dec 2, 2010
I'm trying to find out a way to detect when ever the user presses CTRL -ALT - DEL or Window + L to lock the PC.The code I'm using is
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If (GetAsyncKeyState(17) AndAlso GetAsyncKeyState(18) AndAlso GetAsyncKeyState(46)) Or ((GetAsyncKeyState(91) Or GetAsyncKeyState(92)) AndAlso GetAsyncKeyState(76)) Then[code]....
However, as soon as the user presses CTRL-ALT-DEL the Windows Security Screen comes up and it is too fast for VB to detect that the keys have been pressed.I did a little reaserch on how to work around this issue and found that a GINA stub can be written which can delay the Windows Security Screen by some time say 2 secs which would be enough for VB to detect that the keys have been pressed.Also disabling Ctrl-Alt-Del through VB does not work because it is too fast for VB and I would like not to disable CTRL-ALT-DEL
View 1 Replies
Mar 2, 2011
i am making my final year project in vb.net for data entry i want to make the project more user friendly i use code to change the control focus by pressing 'Enter'(ASCII 13).. and clear the content of current control by pressing 'Esc'(ASCII 27)... in my project one form contains at-least 300 of controls say(t1,t2,t3,t4...)
so in the keypress event of t1 i have writen
if asc(e.keychar)=13 then
t2.focus
elseif asc(e.keychar)=27 then
t1.text=nothing
end if
the code works fine but produce an alert beep when i press ENTER to change the active control...
View 2 Replies
Mar 2, 2012
I want to format my textboxes in such a way that when someone fills in the details in the textbox if they press enter button on the keybord the focus is given to the next textbox that they should fill in .I tried the code below that we used in vb6 but its not working.
View 3 Replies
May 13, 2010
I am using GDI to draw an image of a character on the screen and I would like to animate the character when the user presses an arrow key. Here is my character
character code
character.DrawImage(My.Resources.Right_Standing, 12, 340, 40, 36)
I am using this method
method
Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs)
View 11 Replies
May 10, 2012
Inside a multiline Text Box I want it so that when a user presses Ctrl AND Enter then a new line is entered. But, if they press Enter on it's own, then it acts like the Accept button on the Form. I believe this is how Facebook does it.
Ctrl+Enter=NewLine Enter=Accept
View 2 Replies
Jul 22, 2009
I am looking for a way to send key presses to another program, Ive tried Sendkeys(), Keybd_event() , etc. is there a thrid party dll i could use? whatever i do it needs to be real low-level and totally undetectable.
View 6 Replies
Apr 7, 2011
I am doing some stuff when the user presses the arrow keys, but I fear many controls, like the TabControl, respond to such presses as well. In the case of my TabControl, the arrow presses will make it change of tab. I don't want that.. how can I disable such?
Private Sub Form1_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
If e.KeyValue = 39 Then
doSomethingAwesome[code]....
View 1 Replies
Jan 21, 2010
I am new to VB.Net and programming all together. I am trying to make a program that will take 2 numbers input by the user, Add them together and display the sum. Then take the sum and divide it individually by each number to give you what percent of the sum the numbers are. I'm working on making it a program that will calculate the Hardy-Weinberg equilibrium for my Anthro Class. I'm just doing this for practice for my VB.Net Class. But i will move onto that at a later time. I just want to finish this first.
So.. Here is my code so far. It's not complete yet but this is should be enough to make it function.
[Code]...
View 24 Replies
Nov 12, 2008
about a week since I started. Now I'll just ask my questions straight away:I want to make a program which allows the User to create stuff, say a survey. What I want them to be able to do is,
1. Decide the headline
2. Decide the layout of the survey
3. Import pictures
4. create new pages, like a form.
And then save this survey to a file which can be opened either by itself or by using some sort of viewer program. And I want the user to be able to put in answers to questions in the survey which wont be visible when you open the file in the viewer program. Now I dont expect you to write the program for me, just give me ideas on how to solve them, where I can learn about methods to get there and so on.
View 12 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 4, 2009
the goal i want to accomplish is when the user presses a button, "moneyamount" increases by a random number generated. the problem i am having is that after the action is finished the script does not seem to save the new value and always starts at zero. here is the script:
Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles dojob1button.Click
Dim moneyamount As Integer = moneyamount + Int(Rnd() * 10)
moneylabel.Text = "$" & moneyamount
End Sub
View 4 Replies
Mar 29, 2009
i want to make a program in which the user can input a mathematical function so the program can then work with it. So the user would input something like x^4+x+2 and then an x and the program would calculate f(x). What i don't know is how to let the user input the function.
View 6 Replies
Apr 29, 2011
How to make a program wait until a button is clicked by the user. I want to stop my sequence of codes (statements) until a button is clicked by the user.
View 1 Replies
Jul 14, 2010
I'm planning to make a program that Allows the user to type in the Download Link of another program, and then Run it. I do not want the file to be saved on the user computer.
View 1 Replies