- using Microsoft.WindowsMobile.Status;
- using Microsoft.WindowsMobile.Telephony;
- using Microsoft.WindowsMobile.PocketOutlook;
- public void AddMemo(){
- //取得PDA OutlookSession的執行個體
- OutlookSession a = new OutlookSession();
- //取得目前行事曆的所有的集合
- AppointmentCollection col = a.Appointments.Items;
- //建立一個新行事曆
- Appointment appoi = col.AddNew();
- appoi.Body = this.txtMemo.Text;//內容
- appoi.Location = this.txtLocation.Text;//地點
- appoi.Start = DateTime.Today;//開始日期
- appoi.End = DateTime.Today.AddDays(1);//結束日期
- appoi.Subject = "我是被程式新增的";//主旨
- appoi.Update();//更新到行事曆的集合中
- appoi.ShowDialog();//顯示剛剛新增的行事曆
- }
使用OutlookSession
最新推荐文章于 2019-07-26 08:47:37 发布