Network Communication via VB and SendKeys


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Network Communication via VB and SendKeys

  1. #1
    Kevin B. Guest

    Network Communication via VB and SendKeys


    I have a VB App running on PC-A and another VB App running on PC-B.

    PC-A and PC-B are connected via an Ethernet Hub (LAN).

    I am trying to figure out how (if possible) to press a command button on
    the VB App running on PC-B with the VB App running on PC-A via SendKeys and
    the LAN.

    Here is the code I tried on the VB App in A to press the command button on
    the VB App on PC-B. (This does not work).

    AppActivate ("\\PC-B\VBAppOnB"), False
    SendKeys "%{S}"


    The following code works fine when both Apps are running on the same PC (PC-B).

    AppActivate ("VBAppOnB"), False
    SendKeys "%{S}"

    Is there a better way than SendKeys? Any suggestions are greatly appreciated.

    Thanks,
    Kevin





  2. #2
    GunPaq Guest

    Re: Network Communication via VB and SendKeys

    Kevin,

    I would suggest trying the Winsock control instead. Then you could define
    your own command set so when B receives a particular command from A, it
    could perform the desired action.

    "Kevin B." <netport@cox.net> wrote in message news:3c90e5ab$1@10.1.10.29...
    >
    > I have a VB App running on PC-A and another VB App running on PC-B.
    >
    > PC-A and PC-B are connected via an Ethernet Hub (LAN).
    >
    > I am trying to figure out how (if possible) to press a command button on
    > the VB App running on PC-B with the VB App running on PC-A via SendKeys

    and
    > the LAN.
    >
    > Here is the code I tried on the VB App in A to press the command button on
    > the VB App on PC-B. (This does not work).
    >
    > AppActivate ("\\PC-B\VBAppOnB"), False
    > SendKeys "%{S}"
    >
    >
    > The following code works fine when both Apps are running on the same PC

    (PC-B).
    >
    > AppActivate ("VBAppOnB"), False
    > SendKeys "%{S}"
    >
    > Is there a better way than SendKeys? Any suggestions are greatly

    appreciated.
    >
    > Thanks,
    > Kevin
    >
    >
    >
    >




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center