如何在窗口移动编程中使用多种形式

编程入门 行业动态 更新时间:2024-10-25 20:19:36
本文介绍了如何在窗口移动编程中使用多种形式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

大家好 我想对套接字(TCP)应用程序进行编程.客户端是PPC,服务器是PC.客户端有2种形式,形式1供用户写入服务器IP,服务器端口;单击确定以连接到服务器,然后单击一个按钮以显示表格2.连接到服务器后发送数据的表格2.我想知道如何从表单1的连接设置继续连接到表单2.我的意思是如何在2个表单...之间共享连接设置...例如:表单1连接到服务器,显示表单2和表单2也连接到服务器 抱歉,我的英语不好^ _ ^ 非常感谢!

Hello every body I want to program a socket (TCP) application. Client is PPC and server is PC. Client have 2 forms,form 1 for user to write Server IP, server Port; a button OK to connect to server and a button to show form 2 . Form 2 for send data after connecting to server. I want to know how can I keep connecting to form 2 from connection setting of form 1. I mean how can I share connection setting between 2 form...Ex: form 1 connected to server, show form 2 and form 2 also connected to server Sorry, my English is very bad ^_^ Thank you very much!

推荐答案

我还没有完成WP7之前的Windows移动编程,但是传递套接字(或其他基于流的包装对象)应该很容易.从父表单到子表单. I have not done pre-WP7 Windows mobile programming, but it should be easy to pass a socket (or other stream based wrapper object) from the parent form to the child form. ChildForm form = new ChildForm(); form.Connection = this.Connection; form.Show();

顺便说一下,这是未经测试的手动键入的伪代码!

That''s untested manually typed pseudocode by the way!

更多推荐

如何在窗口移动编程中使用多种形式

本文发布于:2023-10-14 22:41:24,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1492423.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:多种   形式   窗口   如何在

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!