Remote desktop application (vb.net)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jamesd0142
    Contributor
    • Sep 2007
    • 471

    Remote desktop application (vb.net)

    Hi jus looking for some ideas if possible:

    I trying to create a basic remote desktop application (WHY?...to see if i can.).

    I have an idea how i can control the mouse on the remote machine but it doesnt seem very efficient.

    my idea:
    i have a screenshot of the remote desktop refreshed every 100ms in a picture box.
    now i think if i get the mouse possition within this picture box and store it in a txt file every 100ms or less, i can have a timer on the remote machine running every 100ms or less and change the cursor possition according the the values in this file.

    Possible problem: 2 machines accessing the same txt file at the same time?any1 disagree?

    Or any1 have any better ideas?

    James
  • Curtis Rutland
    Recognized Expert Specialist
    • Apr 2008
    • 3264

    #2
    I have an idea. You could set up a TcpListener on your remote desktop application, that, when polled, will transmit the mouse coordinates. Then, set up a TcpClient on the application you will have running on the remote machine. Have the client start polling every 100ms or so, and the listener will return the mouse coordinates. No text file access or anything like that.

    Here's a site to get you started with the TcpListener/TcpClient. It's in C# though, so if you need any help figuring out what's going on, just reply.

    Comment

    • jamesd0142
      Contributor
      • Sep 2007
      • 471

      #3
      Sounds very useful...

      Im using vb express 2005 i dont seem to have tcp listener...

      Is it called something else?

      Comment

      • Curtis Rutland
        Recognized Expert Specialist
        • Apr 2008
        • 3264

        #4
        Originally posted by jamesd0142
        Sounds very useful...

        Im using vb express 2005 i dont seem to have tcp listener...

        Is it called something else?

        Ok, notice that on the C# page, there are these statements at the top:
        Code:
        using System.Net.Sockets;
        using System.IO;
        This is C#'s equivalent to the Imports statement. So you will need:
        Code:
        Imports System.Net.Sockets
        Imports System.IO
        Then you can use the TcpListener and TcpClient.
        Most objects are the same from VB.NET to C#. It's mostly the syntax that differs.

        Comment

        • jg007
          Contributor
          • Mar 2008
          • 283

          #5
          I believe that VNC source is open so you could look through that for ideas althought I have never lookinto it so it might go quite complicated and use it's own mouse , keyboard and screen drivers as remote desktop does.

          allways nice to see people trying just for fun as that is certainly how I have learnt most of my code :)

          plenty of projects listed here - http://sourceforge.net/search/?type_...soft&words=vnc

          Comment

          Working...