我正在嘗試在 C# 中制作一個(gè)簡(jiǎn)單的屏幕共享應(yīng)用程序并找到了本指南:https ://www.c-sharpcorner.com/uploadfile/ulricht/how-to-create-a-simple-screen-sharing-application-in -C-Sharp/并跟隨它,但它不起作用 我在同一臺(tái)計(jì)算機(jī)和兩臺(tái)不同的 PC 上嘗試過(guò)它,但似乎沒(méi)有任何效果//Hostpublic partial class ScreenShareHandler : Form { RDPSession x = new RDPSession(); public ScreenShareHandler() { InitializeComponent(); } private void ScreenShareHandler_Load(object sender, EventArgs e) { } private void Incoming(object Guest) { IRDPSRAPIAttendee MyGuest = (IRDPSRAPIAttendee)Guest;//??? MyGuest.ControlLevel = CTRL_LEVEL.CTRL_LEVEL_INTERACTIVE; } private void button1_Click(object sender, EventArgs e) { x.OnAttendeeConnected += Incoming; x.Open(); } private void button2_Click(object sender, EventArgs e) { IRDPSRAPIInvitation Invitation = x.Invitations.CreateInvitation("Trial", "MyGroup", "", 10); textBox1.Text = Invitation.ConnectionString; } private void button3_Click(object sender, EventArgs e) { x.Close(); x = null; } }//Client public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { } private void button1_Click(object sender, EventArgs e) { string Invitation = textBox1.Text;// "";// Interaction.InputBox("Insert Invitation ConnectionString", "Attention"); axRDPViewer1.Connect(Invitation, "User1", ""); } private void button2_Click(object sender, EventArgs e) { axRDPViewer1.Disconnect(); }}
- 0 回答
- 0 關(guān)注
- 196 瀏覽
添加回答
舉報(bào)
0/150
提交
取消