VBSendText

所属分类:Windows编程
开发工具:Visual Basic
文件大小:51KB
下载次数:181
上传日期:2006-03-31 21:10:12
上 传 者hxycllgy
说明:  VB进程间通讯演示(1.0) 说明:一共四个演示。分别如下: 1:Sample 一个简单的使用了共享内存映射的例子,运行两个实例看看就知道,没有什么特别。 2:SendText 不用窗口子类化,而达到和发送自定义消息同样的效果。 3:SendFile 由于演示2中还是通过发消息来传递字符串,不可能传递大块文本,本例综合演示1和演示2达到传递大块文本的功能。 4:Chat 演示2和演示3使用的都是SendMessage来发放通知消息,所以不能异步通讯,SetWindowText不能跨进程使用,PostMessage只能在WM_USER以上的自定义消息中才能传递指针,那么如何才能异步通讯呢?我还没有好主意,就用定时器吧!看看这个可以聊天的程序就知道了。 Common目录下有四个模块。其中ShareStr2.cls是原来大师Bruce MicKenney写的东西,就是这个东西害我浪费很多时间来调试。
(VB inter-process communication demo (1.0) Note : A total of four demonstration. Respectively, as follows : 1 : Sample a simple use of shared memory mapping example, look at the operation of two examples, we know that nothing special. 2 : SendText not window-type, and to achieve this definition of news from the same effect. 3 : As demonstrated SendFile 2 updates, or to pass through the string, not send bulk text, the cases demonstrate a comprehensive and demonstration to send two large text functions. 4 : Chat demonstration two and three demonstration SendMessage are used to notify the news release, it is not asynchronous communications, inter-process SetWindowText not use PostMessage WM_USER only in the above-defined messages can transfer target, then how can asynchronous communication? I )

文件列表:
Chat (0, 2002-02-02)
Chat.exe (28672, 2002-02-02)
Chat\Chat.vbp (842, 2002-02-02)
Chat\Chat.vbw (132, 2002-02-02)
Chat\FileMapping.vbw (186, 2002-02-02)
Chat\frmFileMapping.frm (3470, 2002-02-02)
Chat\frmFileMapping.frx (6, 2002-02-02)
Chat\MSSCCPRJ.SCC (338, 2002-02-02)
Chat\ShareStr2.cls (4442, 2002-02-02)
Common (0, 2002-02-02)
Common\Debug.bas (5248, 2002-02-02)
Common\modCommon.bas (2229, 2002-02-02)
Common\ShareStr.cls (5150, 2002-02-02)
Common\ShareStr2.cls (4323, 2002-02-02)
MSSCCPRJ.SCC (642, 2002-02-02)
ReadFirst.txt (889, 2002-02-02)
Sample (0, 2002-02-02)
Sample.exe (28672, 2002-02-02)
Sample\Form1.frm (1769, 2002-02-02)
Sample\MSSCCPRJ.SCC (191, 2002-02-02)
Sample\Sample.vbp (828, 2002-02-02)
Sample\Sample.vbw (126, 2002-02-02)
SendFile (0, 2002-02-02)
SendFile.exe (28715, 2002-02-02)
SendFile\frmSendFile.frm (4825, 2002-02-02)
SendFile\frmSendFile.log (135, 2002-02-02)
SendFile\MSSCCPRJ.SCC (193, 2002-02-02)
SendFile\SendFile.vbp (909, 2002-02-02)
SendFile\SendFile.vbw (148, 2002-02-02)
SendText.exe (28672, 2002-02-02)
SetText (0, 2002-02-02)
SetText\frmSendText.frm (3363, 2002-02-02)
SetText\MSSCCPRJ.SCC (193, 2002-02-02)
SetText\SendText.vbp (898, 2002-02-02)
SetText\SendText.vbw (132, 2002-02-02)

VB进程间通讯演示(1.0) 说明: 一共四个演示。分别如下: 1:Sample 一个简单的使用了共享内存映射的例子,运行两个实例看看就知道,没有什么特别。 2:SendText 不用窗口子类化,而达到和发送自定义消息同样的效果。 3:SendFile 由于演示2中还是通过发消息来传递字符串,不可能传递大块文本,本例综合演示1和演示2达到传递大块文本的功能。 4:Chat 演示2和演示3使用的都是SendMessage来发放通知消息,所以不能异步通讯,SetWindowText不能跨进程使用,PostMessage只能在WM_USER以上的自定义消息中才能传递指针,那么如何才能异步通讯呢?我还没有好主意,就用定时器吧!看看这个可以聊天的程序就知道了。 Common目录下有四个模块。 其中ShareStr2.cls是原来大师Bruce MicKenney写的东西,就是这个东西害我浪费很多时间来调试。原来大师的东西也会有错。 代码做过一点注释,不过做得不好,乱! 有些问题在注释里做了说明,这里就不说了。 至于用剪贴板,管道、邮件槽、COM+组件等等方法,以后有时间还要研究研究。 在VB里使用内存文件映射技术需要大量使用CopyMemory,还要处理好DBCS和UNICODE的关系,程序虽然已经调试通过,还需要大家一起改进。

近期下载者

相关文件


收藏者