How use the Sendkey in .net - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

How use the Sendkey in .net

a.llexa.llex Posts: 7Member
What is the command in vb.net what works like the SENDKEY in vb6?
Sendkey command fill the keyboard buffer with a character.

Comments

  • btsebbtseb Posts: 67Member
    : What is the command in vb.net what works like the SENDKEY in vb6?
    : Sendkey command fill the keyboard buffer with a character.
    :
    Example from Visual Studio Help Section:
    [code]AppActivate("Untitled - Notepad")
    SendKeys.SendWait("Hello world!")
    ' Send Ctrl S to open the Save As dialog box.
    SendKeys.SendWait("^S")
    ' Send the name of the new file.
    SendKeys.SendWait("c:HelloWorld.txt")
    ' Send Alt S to save the file.
    SendKeys.SendWait("%S")[/code]
    Compiling the Code
    This example requires:

    A reference to the [b]System.Windows.Forms[/b] namespace.
    A running instance of the Notepad (notepad.exe) application.
  • kenifkenif Posts: 2Member
    Save must be a small s:
    SendKeys.SendWait("^s")

    And it makes more sense to open the app than activate:
    Shell("notepad", vbNormalFocus)
  • kenifkenif Posts: 2Member
    Save must be a small s:
    SendKeys.SendWait("^s")

    And it makes more sense to open the app than activate:
    Shell("notepad", vbNormalFocus)
Sign In or Register to comment.