|
-
Feb 23rd, 2008, 05:39 PM
#1
Thread Starter
Hyperactive Member
[2005] How to send "Enter"
How can I send to application "Enter", or other keys? I mean:
Code:
Dim hwnd As Int32 = FindWindow("Notepad", Nothing)
If Not hwnd = 0 Then
hwnd = FindWindowEx(hwnd, 0, "edit", Nothing)
If Not hwnd = 0 Then
SendMessage(hwnd, WM_PASTE, 0, 0)
End If
End If
I won't "paste" something, but send key like "Enter" or "Esc".
-
Feb 24th, 2008, 01:27 PM
#2
-
Feb 24th, 2008, 02:17 PM
#3
Thread Starter
Hyperactive Member
Re: [2005] How to send "Enter"
I need to send win mesasge, not use sendkeys (target window can be hidden).
-
Feb 25th, 2008, 06:22 AM
#4
Hyperactive Member
-
Feb 25th, 2008, 07:19 AM
#5
Thread Starter
Hyperactive Member
Re: [2005] How to send "Enter"
It's not a solution. If somebody is using PC at that moment, my app will take focus for a while. I need app. working hidden, without disturbing users (I wrote something like you described, but it's really wrong way to send keys to app.).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|