|
|
Guys i have tried designing a quite different application using vb.net.The function of this application is to detect whick key is pressed in keyboard even when my application is minimised.
for example if iam using notepad to type some text i have to press the keys for giving input to the notepad while pressing each key my application has to detect which key is pressed.
All these are working in my own textbox(I have used key press event for this). but it is not working in other apps and also when it is minimized.
how to solve this problem
Help me Guyzzzz........
|
|
|
|
|
srinivasankrishnaa wrote: but it is not working in other apps and also when it is minimized. Because your app does not have input-focus.
srinivasankrishnaa wrote: The function of this application is to detect whick key is pressed in keyboard even when my application is minimised. What you want is a keylogger; this can't be done using events, as Windows does not generate events in your app for things that are happening to other apps.
Code for a keylogger can be found anywhere on the internet. A word of warning though; depending on your location, you'd need to inform the user and/or get his permission to run this software.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Google for "VB.NET Global Keyboard Hook".
|
|
|
|
|
As you have suggested i have designed a keylogger using "asynckeystate" function but it is Not detecting semicolon,colon,braces,and whether small letters or capital letters etc.
How to solve this.
|
|
|
|
|
I have no idea as we haven't seen your code. Without seeing the RELEVENT parts of the code, it's impossible to tell you what's going wrong.
|
|
|
|
|
Here is my code:-
Public Class Form1
Public Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Int32) As Short
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Dim k1, k2, k3, k4, k5, k6, k7, k8, k9, k10, k12, k13 As Boolean
k1 = GetAsyncKeyState(Keys.A)
k2 = GetAsyncKeyState(Keys.LControlKey)
k3 = GetAsyncKeyState(Keys.RControlKey)
k4 = GetAsyncKeyState(Keys.F1)
If k1 = True Then
MsgBox("Key A is Pressed")
End If
If k2 = True Then
MsgBox("Key Lcontorl is Pressed")
End If
If k3 = True Then
MsgBox("Key Rcontorl is Pressed")
End If
If k4 = True Then
MsgBox("key F1 is pressed")
End If
End Sub
End Class
This detects whether "Key A" is pressed or not but how to use it to detect whether the key pressed is small "a" or Caps "A" and similarly for other alphabets and also to detect colon,semi-colon,braces etc.
plz help me guys.
|
|
|
|
|
Yeah, this is never going to work. This needs to be scrapped and redone. You SERIOUSLY need to Google for "VB.NET global keyboard hook" and study what you find.
The reason this won't work is because your timer probably isn't going to fire fast enough and if you turn up the frequency this runs, you'll just end up pegging a CPU and still missing keys.
|
|
|
|
|
srinivasankrishnaa wrote: How to solve this. That's how a KEYlogger works; it logs all the keys that are pressed on a keyboard.
A key is not a character. A capital A is typed by holding the A-key and the SHIFT-key. It'll depend on the loaded keyboard-layout to which characters the pressed *keys* will be translated.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
If So I wil ask one more question
if i press "a" or "A" in my keyboard the current application is displaying the pressed character
now if i press small "a" in my keyboard my current application has to display small "b" and it should not display small "a".when my application is minimized.
how to do this.
|
|
|
|
|
Send key "a" when the user presses your key. Send keys "backspace" and "b" when the user hits that key again.
It'll work "most of the time", and you'll be mucking with focus, some stubborn apps that'll never work (because of the way they're built) and, worst of all, a delay between input and user-feedback.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I'm looking for recommendations for the best reading articles, white papers, tutorials etc. on Microsoft Extensibiliy Framework. I have a complex modular application to architect, and really need to brush up on more than just compile time exports and imports.
|
|
|
|
|
|
How Does A on screen keyboard work in the current application?
my keyboard is working only in my application textbox,i have designed it in vb.net.
|
|
|
|
|
An onscreen keyboard is generally supposed to work with its own application for security reasons.
|
|
|
|
|
But How can I use It to type in Other Applications.
|
|
|
|
|
srinivasankrishnaa wrote: But How can I use It to type in Other Applications Send the keys[^] to that application.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
while pressing the keys it should go to the current application.
Any Code Suggestions........
|
|
|
|
|
srinivasankrishnaa wrote: while pressing the keys it should go to the current application. Pressing which keys? The buttons in your on-screen keyboard? You can "send" the key to any application.
srinivasankrishnaa wrote: Any Code Suggestions........ Available from both the link to MSDN that I posted as well as Google. There are enough samples on using sendkeys.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I have created a WCF Data Service (v5.6.0) based on a (model-first) Entity Framework (v5.0) model. I created a new/fresh model to be sure to have all 'defaults' in place (also tried disabling lazy loading but didn't help).
Working
I can now create a Service Reference in a test application (Windows application). From code I can use the generated proxy as if it is the actual model. I can query the data. So far so good.
Wish
However what I would like is to bind my WCF service to a data bound control, e.g. a DataGridView. For this we would like to use the Visual Studio designer so that we can select columns and so on.
Bug?
What I do for this is I click the arrow of the control and then use the "Choose Data Source" dropdown to select "Add Project Data Source" and then select "Service" to create a new service reference. This works without errors. However no data source is created and when I select the arrow again and go to "Choose Data Source" I see absolutely no data source. Also no errors. It gracefully fails.
Am I missing something obvious or is this a bug? Any help will be appreciated.
tnx!
|
|
|
|
|
Hi,
I am developing a wpf application. i want to upload the images from client location to server(www.xxxx.com/Images/image1.jpg) location. Let me if any samples.
Thanks.
|
|
|
|
|
There are many samples showing how to do this. What you're looking for is a web service sitting at the server end (I'm sure you can find these), and a reference to that service in your WPF code. Again, you should be able to find millions of references to this on Google.
|
|
|
|
|
httputility.HtmlEncode in not declared
VB.2008 Windows App, I see plenty of references to htmlEncode but getting it declared seems to be an issue.
Imported System.Web and Xml and Net, etc but just cannot to httputility.HtmlEncode
What am I missing?
|
|
|
|
|
Have you added a reference to the System.Web assembly, or just imported the System.Web namespace? (You'll need to do both.)
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Original just imported. Added System.Web to Imported Names spaces but did NOT help.
If I put in system.web. httpUtiltity does NOT appear. Only get 3 options AspNetHostingPermission,AspNetHostingPermissionAtribute, and AspNetHostingPermissionLevel.
|
|
|
|