Reading SMS Inbox using VB.NET
Hi everyone. I'm currently doing a school project, which require me to build a Mobile Application which is strictly using VB.NET as the language and the Windows Mobile SDK 6.
Here is my problem. I have found out how to recieve SMS messages when they are incoming and get their body text and use it to do something.
However, I now need to get the existing messages in the SMS inbox as well as delete them.
From my search on Google, I get plenty of weird results and codings ranging from C# to C++. However, my project require me to do it in VB.NET and that's the only language out of the three I know, so I cannot translate manually from C++ to VB.NET.
So can anyone kindly please guide me and my project team on this? I appreciate it and thanks in advance.
Re: Reading SMS Inbox using VB.NET
If you have C# examples you can convert the to VB with many internet converters.
Also i think this forum has tons of examples for sms's . Do a search.
Re: Reading SMS Inbox using VB.NET
You need to check if it is available using the pocket outlook name space
I seem to remember it isn't easily do-able without using MAPI or a 3rd party tool like InTheHand
Re: Reading SMS Inbox using VB.NET
Thanks for the quick responses. However, samples related to SMS inbox I find are all in C++. I'm manage to only find one person posting the same question without any responses. I'm not very sure.
Re: Reading SMS Inbox using VB.NET
Oh come on. Did you search?
Anyway.
Here (C++,C#,VB)
http://www.vbforums.com/showthread.php?t=498642
Re: Reading SMS Inbox using VB.NET
Thanks, I'm trying to study the articles found in the links of the thread, but since I'm new in this area, I'm pretty much do not understand most of the things there.
Basicly, I need to learn how to delete an SMS from the Windows Mobile 6 phone's inbox and I can specify the conditions to do it.
Condition can include date recieved, sent by or by some primary index.
Re: Reading SMS Inbox using VB.NET
Well i'm no expert in WM6 (pete can help you out) but i think there is a new outlook class that can do what you want very easy.
Re: Reading SMS Inbox using VB.NET
Thanks. I really hope someone could guide me along as I'm still pretty lost.
Re: Reading SMS Inbox using VB.NET
Code:
Imports System.Text
Imports System.IO
Imports System.Windows.Forms
Imports Microsoft.WindowsMobile.Forms
Imports Microsoft.WindowsMobile.PocketOutlook.MessageInterception
Public Class Class1
Private Sub CountSMS()
Try
Dim smsAcc As SmsAccount
Dim smsFdr As SmsMessageFolder
smsFdr = smsAcc.Inbox
MessageBox.Show("SMS Count: " & smsFdr.Count)
Catch
MessageBox.Show("Error: Unable to count!")
End Try
End Sub
End Class
Recently I went to get the InTheHand Library evaluation version to try. I went to experiment with the SMS Inbox and found one problem. I always get a NullReferenceException with the SmsAccount.
I would like to ask, how do you retrieve the SMS Account from your windows mobile device?
Thanks
Re: Reading SMS Inbox using VB.NET
Sorry... I really need help urgently... Can somebody who are very keen in this area please help me out? I really appreciate it.
Re: Reading SMS Inbox using VB.NET
I think MAPI is the only option, and the InTheHand control wraps MAPI for you. There is a good article here that should help, although it is written in c# you can use a translation site. It should give you more insight.
Re: Reading SMS Inbox using VB.NET
Dim sess As New InTheHand.WindowsMobile.PocketOutlook.OutlookSession
Dim smsAcc As SmsAccount = sess.SmsAccount
Dim smsFdr As SmsMessageFolder
smsFdr = smsAcc.Inbox
MsgBox("SMS Count: " & smsFdr.Count)
Re: Reading SMS Inbox using VB.NET
You can try this page of msdn. Here you get code and explanation of how to intercept incoming sms messages using vb.net .
http://msdn.microsoft.com/en-us/library/bb932385.aspx
Re: Reading SMS Inbox using VB.NET
why did you bring up a thread that died on 28-Oct-2008?