none
新手求前辈指点-- 关于VB.NET 接收短信问题 RRS feed

  • 问题





  • 通过短信猫收到的信息被存储在了sim卡里,如下 (SM 代表sim卡;后面的数字代表存储的位置,叫Index Number)

    +CMTI: "SM",28

    +CMTI: "SM",29

    +CMTI: "SM",30

    下面是接收部分的源码













    '--Event handler for the dataReceived event-- Private Sub DataReceived(ByVal sender As Object, _ ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) _ Handles serialPort.DataReceived '---invoke the delegate to retrieve the received data--- txtDataReceived.BeginInvoke(New _ myDelegate(AddressOf updateTextBox), _ New Object() {}) End Sub '---Delegate and subroutine to update the TextBox control--- Public Delegate Sub myDelegate() Public Sub updateTextBox() '---append the received data into the TextBox control--- With txtDataReceived .AppendText(serialPort.ReadExisting) .ScrollToCaret() End With End Sub
    请问如何在这段源码里面制作一个类似装载Index Number的载体  然后利用AT+CMGR="Index Number" 来读取信息  谢谢
    2009年12月29日 9:17

答案