如何在窗口移动编程中使用多种形式 [英] how to using multi form in window mobile programming

查看:88
本文介绍了如何在窗口移动编程中使用多种形式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好
我想对套接字(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!


这篇关于如何在窗口移动编程中使用多种形式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆