san san

san san

  • NA
  • 1
  • 0

SelectedIndexChanged is not firing...

Jun 10 2009 2:58 AM
hi, i am student. I am doing a project on windows mobile now. I face a problem which is my SelectedIndexChanged is not firing. This is my code.. anyone can help me..please... namespace SmartDeviceProject1 { public partial class Form1 : Form { MessageInterceptor msgInterceptor; public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { msgInterceptor = new MessageInterceptor( InterceptionAction.NotifyAndDelete, true); //---set the filter for the message--- msgInterceptor.MessageCondition = new MessageCondition( MessageProperty.Body, MessagePropertyComparisonType.StartsWith, "Message", true); //---set the event handler for the message interceptor--- msgInterceptor.MessageReceived += new MessageInterceptorEventHandler( msgInterceptor_MessageReceived); } void msgInterceptor_MessageReceived( object sender, MessageInterceptorEventArgs e) { //---obtain the content of the SMS received--- SmsMessage smsReceived = (SmsMessage)e.Message; //---add the message to the listbox control--- listBox1.Items.Add(smsReceived.Body) } private void listBox1_SelectedIndexChanged( object sender, EventArgs e) { string info = listBox1.SelectedItem.ToString(); string[] column = info.Split('|'); if (column.Length == 4) { lblCellID.Text = column[1]; lblWaveform.Text = column[2]; lblTime.Text = column[3]; } } } }