Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
M

Member 3727499

@Member 3727499
About
Posts
5
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Problem with Send Keys to background process
    M Member 3727499

    Hi! I found the solution! it is a mix between a sendkeys and postmessage, that works :) First, set the "ControlKey" to "active" (i think it's like if we "press" the keyboard controlkey), then send the PostMessage to the hWnd (application), and then restore the "ControlKey" state.

    keybd_event(VK_CONTROL, (byte)MapVirtualKey(VK_CONTROL, 0), 0, 0); // Control Down
    PostMessage(hWnd, WM_KEYDOWN, (uint)VK_F, 0); // F
    keybd_event(VK_CONTROL, (byte)MapVirtualKey(VK_CONTROL, 0), 2, 0); // Control Up

    Thanks to all for the replies. :)

    C# help tutorial question

  • Problem with Send Keys to background process
    M Member 3727499

    Hi, thanks for your reply, but the problem is that i need to do this without setting focus on the application :~ . I'm trying to do this with the notepad (for test), sending CTRL+F to open the "Search" window, but when i run the application, the notepad shows a "F" in the edit area. I don't know why it's ignoring the "CTRL".

    C# help tutorial question

  • Problem with Send Keys to background process
    M Member 3727499

    Thanks for both quick replies, but it doesn't seems to work :| Is there other way to do this? I can't use sendkeys because the application is minimized. Thanks

    C# help tutorial question

  • Problem with Send Keys to background process
    M Member 3727499

    Hi everybody. I'm developing an application that sends keystrokes to another background application. The problem is that i have so send a "Alt+F", but i can't get it to work. I'm using PostMessage:

    [DllImport("User32.Dll", EntryPoint = "PostMessageA")]
    private static extern bool PostMessage(IntPtr hWnd, uint msg, int wParam, int lParam);

    const int VK_ALT = 0x12;
    const int WM_KEYDOWN = 0x100;

    PostMessage(hWnd, WM_KEYDOWN, VK_ALT, 0);
    PostMessage(hWnd, WM_KEYDOWN, VK_F, 0);

    The result is that the background application "see" the "F", but no the "Alt". Anybody has any idea how to fix it or how to do this without using SendKeys? Because the background application used to be minimized. Greetings and thanks in advance. :)

    C# help tutorial question

  • DLL reference not found when changing the app path
    M Member 3727499

    Hi, i'm having this problem and can't find a solution. This image describes all the problem.(Image) Thanks a lot.

    C# help
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups