Howdy, Stranger!

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

Categories

How use the Sendkey in .net

a.llexa.llex Member Posts: 7
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 Member Posts: 67
    : 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 Member Posts: 2
    Save must be a small s:
    SendKeys.SendWait("^s")

    And it makes more sense to open the app than activate:
    Shell("notepad", vbNormalFocus)
  • kenifkenif Member Posts: 2
    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.