i want to design a teamviewer kind of application in vb.net from which i can able to remote thr pc and solve thr issues. but i tried to search online but find nothing. can anyone help me here

Recommended Answers

All 3 Replies

Sending mouse and keyboard events depends on the language you use, but the real problem is how to send and update the real-time screen image across a limited bandwith. It all comes down to how you compress the screen images.
We had a long thread on this in the Java forum a while back. If you skip straight to the end you'll find the algorithm that worked best for us. (The code is Java, but you will be able to translate the compression code to VB very easily.) https://www.daniweb.com/software-development/java/threads/254810/find-the-differences-between-two-images-and-the-locations-of-the-differences/

commented: helpfull but need more clearification +1

i checked that but it is not really clear. can suggest me any website or any open source so i can able to use that or take help from it

Sorry, I don't have any other info - that's one reason why we ended up developing our own algorithm.

Briefly:
We send the screen image as a series of 32 bit words that encode the content as a string of pixels top-left to bottom-right.
If (as is usually true) there are pixels unchanged from the last image we just send the number of consecutive unchanged pixels.
When there are changed pixels we send the new RGB values for those pixels. Because there are often runs of identical pixels we further compress the changed pixels by sending the count of the consecutive identical pixels (run-length encoding, or RLE).

Ie there are two kinds of 32 bit word sent:
pixels unchanged from previous image:
first byte = 0, bytes 1-3 = number of unchanged pixels
or
changed pixels:
first byte = number of consecutive identical pixels
bytes 1-3 = RGB values for those pixels

Unless you want lossy compression (not good for small text om screens!), this algorithm gives you a lossless compression for typical screens that is near optimum while being easy to code and very fast to run. Eg: if the screen hasn't changed since the previous send it's just a single word (0 + number of pixels on screen). If there is just a letter or two that has changed then only the changed letters are encoded, and the RLE encoding does that very efficiently.

I found it gave a better frame rate than TeanViewer in my environment. Warning: It's not good for lots of moving images (video).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.