如何接收短信并直接在richtextbox中阅读? [英] how to receive sms and read it directly in richtextbox?

查看:65
本文介绍了如何接收短信并直接在richtextbox中阅读?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿伙计们,我真的需要一些帮助。



我尝试了下面创建的代码,但它无法接收消息。如果我可以直接在Richtextbox中阅读它。



这里是代码:



Public Sub接收()

如果srPort.IsOpen = True则

尝试



使用srPort

.WriteLine(AT)

.WriteLine(AT + CMGF = 1&Chr(34)&vbCrLf)

.WriteLine( AT + CSCS =PCCP437&Chr(34)&vbCrLf)

.WriteLine(AT + CPMS =SM&Chr(34)&vbCrLf)

.WriteLine(AT + CMGL =REC UNREAD&receiveRT.Text&vbCrLf)





结束

Catch ex As Exception



结束尝试



结束如果

结束子



结束如果

结束Sub

解决方案

访问链接...

http://www.daniweb.com/software-development/visual-basic-4-5- 6 / threads / 280300 / code-for-receive-sms-on-pc-using-at-coomand-and-in-vb6 [ ^ ]

快乐编码!

:)


hey guys i really need some help.

i tried this codes below that i created but it cant receive messages. and if it can i like to read it directly in Richtextbox.

here is the code:

Public Sub receive()
If srPort.IsOpen = True Then
Try

With srPort
.WriteLine("AT")
.WriteLine("AT+CMGF=1" & Chr(34) & vbCrLf)
.WriteLine("AT+CSCS=""PCCP437""" & Chr(34) & vbCrLf)
.WriteLine("AT+CPMS=""SM""" & Chr(34) & vbCrLf)
.WriteLine("AT+CMGL=""REC UNREAD""" & receiveRT.Text & vbCrLf)


End With
Catch ex As Exception

End Try

End If
End Sub

End If
End Sub

解决方案

visit link...
http://www.daniweb.com/software-development/visual-basic-4-5-6/threads/280300/code-for-receiving-sms-on-pc-using-at-coomand-and-in-vb6[^]
Happy Coding!
:)


这篇关于如何接收短信并直接在richtextbox中阅读?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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