C # LAN desktop sharing software (I)

Source: Internet
Author: User

I haven't written an article for a long time. Today I share my article on LAN desktop sharing software. I believe many people have done it and may encounter some problems. I will test it one by one here.

These include LAN file transmission, desktop screenshots, and image compression. Code is not encapsulated to demonstrate more straightforward functions of the program.

 

It is very easy to get desktop images.

= =bitmap); 
g.CopyFromScreen(, , , , bitmap.Size);
bitmap;
}

Client

Define global variables

Socket sendsocket;

Button event (connect to the server and send the desktop)

  btnConn_Click(=                 IPEndPoint ipendpiont =  IPEndPoint(IPAddress.Parse(textBox1.Text.Trim()),                 Thread th =  Thread(= 

Thread execution body

  (= [] b =

Server (there is a PictureBox in the form)

Define global variables

Socket hostSocket;Thread thread;

Button event (enable service)

  btnStart_Click(= =  IPEndPoint(IPAddress.Parse(textBox1.Text.Trim()), ==  Thread(= 

Thread execution body

  ([] b =  [ * = ==

If you test this program, you will find some problems, and I will handle your problems later.

Because the program is simple, no source code attachment will be uploaded.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.