SilverlightShow: Windows Phone 7.5 - Use Background agents Comments http://www.silverlightshow.net/ Silverlight articles, Silverlight tutorials, Silverlight videos, Silverlight samples SilverlightShow.net http://www.rssboard.org/rss-specification Argotic Syndication Framework 2008.0.2.0, http://www.codeplex.com/Argotic en-US estoychev@completit.com (Emil Stoychev) Re: Windows Phone 7.5 - Use Background agents <p>Friends</p> <div> <p><span style="font-family: tahoma, sans-serif; font-size: 10pt;">Please help .I have followed most of your tutorials ,and now I have created a mobile application in vb.net .I want it to be able to automatically sent Sms message to my friends reminding them about the meeting schedules or birthdays </span></p> </div> <div> <p><span style="font-family: tahoma, sans-serif; font-size: 10pt;"> </span></p> </div> <div> <p><span style="font-family: tahoma, sans-serif; font-size: 10pt;">Help me what do I do to make it work in my windows phone</span></p> </div> <div> <p><span style="font-family: tahoma, sans-serif; font-size: 10pt;"> </span></p> </div> <div>Please find the attached source code below <div class="reCodeBlock" style="overflow-y: auto;border: #7f9db9 1px solid;"> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">001.</code><span style="margin-left: 0px !important;"><code style="color: #069; font-weight: bold;">Option</code> <code style="color: #000;">Explicit </code><code style="color: #069; font-weight: bold;">On</code></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">002.</code><span style="margin-left: 0px !important;"><code style="color: #069; font-weight: bold;">Option</code> <code style="color: #000;">Strict Off </code></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">003.</code><span style="margin-left: 0px !important;"><code style="color: #069; font-weight: bold;">Imports</code> <code style="color: #000;">System </code></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">004.</code><span style="margin-left: 0px !important;"><code style="color: #069; font-weight: bold;">Imports</code> <code style="color: #000;">System.Data </code></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">005.</code><span style="margin-left: 0px !important;"><code style="color: #069; font-weight: bold;">Imports</code> <code style="color: #000;">System.Data.SqlServerCe </code></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">006.</code><span style="margin-left: 0px !important;"><code style="color: #069; font-weight: bold;">Imports</code> <code style="color: #000;">Microsoft.WindowsMobile.PocketOutlook </code></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">007.</code><span style="margin-left: 0px !important;"><code style="color: #069; font-weight: bold;">Imports</code> <code style="color: #000;">System.Resources </code></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">008.</code><span style="margin-left: 0px !important;"><code style="color: #069; font-weight: bold;">Imports</code> <code style="color: #000;">System.IO </code></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">009.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">010.</code><span style="margin-left: 0px !important;"><code style="color: #069; font-weight: bold;">Public</code> <code style="color: #069; font-weight: bold;">Class</code> <code style="color: #000;">frmMain </code></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">011.</code><span><code>     </code><span style="margin-left: 15px !important;"> </span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">012.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">Dim</code> <code style="color: #000;">formLoadFlag </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #069; font-weight: bold;">Boolean</code> <code style="color: #000;">= </code><code style="color: #069; font-weight: bold;">False</code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">013.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">Private</code> <code style="color: #069; font-weight: bold;">Sub</code> <code style="color: #000;">MenuExit_Click(</code><code style="color: #069; font-weight: bold;">ByVal</code> <code style="color: #000;">sender </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #000;">System.</code><code style="color: #069; font-weight: bold;">Object</code><code style="color: #000;">, </code><code style="color: #069; font-weight: bold;">ByVal</code> <code style="color: #000;">e </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #000;">System.EventArgs) </code><code style="color: #069; font-weight: bold;">Handles</code> <code style="color: #000;">MenuExit.Click </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">014.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">Application.</code><code style="color: #069; font-weight: bold;">Exit</code><code style="color: #000;">() </code><code style="color: #008200;">'Exits the Application </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">015.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">End</code> <code style="color: #069; font-weight: bold;">Sub</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">016.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">017.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">Private</code> <code style="color: #069; font-weight: bold;">Sub</code> <code style="color: #000;">showDataInForm() </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">018.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">txtName.Text = MINUTESDataSet.MINUTES(HScrollBar.Value).Agenda </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">019.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">DateTimePicker.Value = MINUTESDataSet.MINUTES(HScrollBar.Value).dateOfMeeting </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">020.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">txtMobileNumber.Text = MINUTESDataSet.MINUTES(HScrollBar.Value).mobileNumber </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">021.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">txtNotes.Text = MINUTESDataSet.MINUTES(HScrollBar.Value).Minutes </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">022.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">023.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">updateRecordCount(MINUTESDataSet.MINUTES(HScrollBar.Value).sno) </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">024.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">End</code> <code style="color: #069; font-weight: bold;">Sub</code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">025.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">026.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">Private</code> <code style="color: #069; font-weight: bold;">Sub</code> <code style="color: #000;">updateRecordCount(</code><code style="color: #069; font-weight: bold;">ByVal</code> <code style="color: #000;">intCurrentRecord </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #069; font-weight: bold;">Integer</code><code style="color: #000;">) </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">027.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">lblRecCount.Text = </code><code style="color: blue;">"Displaying "</code> <code style="color: #000;">& HScrollBar.Value + 1 & </code><code style="color: blue;">" of "</code> <code style="color: #000;">_ </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">028.</code><span><code>            </code><span style="margin-left: 36px !important;"><code style="color: #000;">& MINUTESDataSet.MINUTES.Rows.Count & </code><code style="color: blue;">" Records"</code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">029.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">End</code> <code style="color: #069; font-weight: bold;">Sub</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">030.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">031.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">Private</code> <code style="color: #069; font-weight: bold;">Sub</code> <code style="color: #000;">bdTabControl_SelectedIndexChanged(</code><code style="color: #069; font-weight: bold;">ByVal</code> <code style="color: #000;">sender </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #069; font-weight: bold;">Object</code><code style="color: #000;">, </code><code style="color: #069; font-weight: bold;">ByVal</code> <code style="color: #000;">e </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #000;">System.EventArgs) </code><code style="color: #069; font-weight: bold;">Handles</code> <code style="color: #000;">bdTabControl.SelectedIndexChanged </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">032.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #069; font-weight: bold;">If</code> <code style="color: #000;">formLoadFlag = </code><code style="color: #069; font-weight: bold;">False</code> <code style="color: #069; font-weight: bold;">Then</code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">033.</code><span><code>            </code><span style="margin-left: 36px !important;"><code style="color: #000;">MINUTESTableAdapter.Fill(MINUTESDataSet.MINUTES) </code><code style="color: #008200;">'Filling the data from adapter to dataset </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">034.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">035.</code><span><code>            </code><span style="margin-left: 36px !important;"><code style="color: #000;">DateTimePicker.MaxDate = Today.AddDays(366) </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">036.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">037.</code><span><code>            </code><span style="margin-left: 36px !important;"><code style="color: #000;">formLoadFlag = </code><code style="color: #069; font-weight: bold;">True</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">038.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #069; font-weight: bold;">End</code> <code style="color: #069; font-weight: bold;">If</code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">039.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">040.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #069; font-weight: bold;">Select</code> <code style="color: #069; font-weight: bold;">Case</code> <code style="color: #000;">bdTabControl.SelectedIndex </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">041.</code><span><code>            </code><span style="margin-left: 36px !important;"><code style="color: #069; font-weight: bold;">Case</code> <code style="color: #000;">0 </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">042.</code><span><code>                </code><span style="margin-left: 48px !important;"><code style="color: #000;">MenuModify.Enabled = </code><code style="color: #069; font-weight: bold;">True</code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">043.</code><span><code>                </code><span style="margin-left: 48px !important;"><code style="color: #000;">MenuDelete.Enabled = </code><code style="color: #069; font-weight: bold;">True</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">044.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">045.</code><span><code>                </code><span style="margin-left: 48px !important;"><code style="color: #000;">HScrollBar.Maximum = MINUTESDataSet.MINUTES.Rows.Count - 1 </code><code style="color: #008200;">'Set the scroll bar value </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">046.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">047.</code><span><code>                </code><span style="margin-left: 48px !important;"><code style="color: #069; font-weight: bold;">If</code> <code style="color: #000;">MINUTESDataSet.MINUTES.Rows.Count > 0 </code><code style="color: #069; font-weight: bold;">Then</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">048.</code><span><code>                    </code><span style="margin-left: 60px !important;"><code style="color: #000;">showDataInForm() </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">049.</code><span><code>                </code><span style="margin-left: 48px !important;"><code style="color: #069; font-weight: bold;">Else</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">050.</code><span><code>                    </code><span style="margin-left: 60px !important;"><code style="color: #000;">txtName.Text = </code><code style="color: blue;">""</code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">051.</code><span><code>                    </code><span style="margin-left: 60px !important;"><code style="color: #000;">txtMobileNumber.Text = </code><code style="color: blue;">""</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">052.</code><span><code>                    </code><span style="margin-left: 60px !important;"><code style="color: #000;">txtNotes.Text = </code><code style="color: blue;">""</code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">053.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">054.</code><span><code>                    </code><span style="margin-left: 60px !important;"><code style="color: #000;">showMessage(</code><code style="color: blue;">"Database is empty. Please fill records."</code><code style="color: #000;">) </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">055.</code><span><code>                </code><span style="margin-left: 48px !important;"><code style="color: #069; font-weight: bold;">End</code> <code style="color: #069; font-weight: bold;">If</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">056.</code><span><code>            </code><span style="margin-left: 36px !important;"><code style="color: #069; font-weight: bold;">Case</code> <code style="color: #000;">1 </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">057.</code><span><code>                </code><span style="margin-left: 48px !important;"><code style="color: #000;">MenuModify.Enabled = </code><code style="color: #069; font-weight: bold;">False</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">058.</code><span><code>                </code><span style="margin-left: 48px !important;"><code style="color: #000;">MenuDelete.Enabled = </code><code style="color: #069; font-weight: bold;">False</code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">059.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">060.</code><span><code>                </code><span style="margin-left: 48px !important;"><code style="color: #069; font-weight: bold;">If</code> <code style="color: #000;">MINUTESDataSet.MINUTES.Rows.Count < 1 </code><code style="color: #069; font-weight: bold;">Then</code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">061.</code><span><code>                    </code><span style="margin-left: 60px !important;"><code style="color: #000;">showMessage(</code><code style="color: blue;">"Database is empty. Please fill records."</code><code style="color: #000;">) </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">062.</code><span><code>                </code><span style="margin-left: 48px !important;"><code style="color: #069; font-weight: bold;">End</code> <code style="color: #069; font-weight: bold;">If</code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">063.</code><span><code>            </code><span style="margin-left: 36px !important;"><code style="color: #069; font-weight: bold;">Case</code> <code style="color: #000;">2 </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">064.</code><span><code>                </code><span style="margin-left: 48px !important;"><code style="color: #000;">MenuModify.Enabled = </code><code style="color: #069; font-weight: bold;">False</code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">065.</code><span><code>                </code><span style="margin-left: 48px !important;"><code style="color: #000;">MenuDelete.Enabled = </code><code style="color: #069; font-weight: bold;">False</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">066.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #069; font-weight: bold;">End</code> <code style="color: #069; font-weight: bold;">Select</code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">067.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">End</code> <code style="color: #069; font-weight: bold;">Sub</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">068.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">069.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">Private</code> <code style="color: #069; font-weight: bold;">Sub</code> <code style="color: #000;">cmdAdd_Click(</code><code style="color: #069; font-weight: bold;">ByVal</code> <code style="color: #000;">sender </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #000;">System.</code><code style="color: #069; font-weight: bold;">Object</code><code style="color: #000;">, </code><code style="color: #069; font-weight: bold;">ByVal</code> <code style="color: #000;">e </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #000;">System.EventArgs) </code><code style="color: #069; font-weight: bold;">Handles</code> <code style="color: #000;">cmdAdd.Click </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">070.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #069; font-weight: bold;">If</code> <code style="color: #000;">validateControls() = </code><code style="color: #069; font-weight: bold;">True</code> <code style="color: #069; font-weight: bold;">Then</code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">071.</code><span><code>            </code><span style="margin-left: 36px !important;"><code style="color: #069; font-weight: bold;">If</code> <code style="color: #000;">cmdAdd.Text = </code><code style="color: blue;">"Update"</code> <code style="color: #069; font-weight: bold;">Then</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">072.</code><span><code>                </code><span style="margin-left: 48px !important;"><code style="color: #000;">addNewData() </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">073.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">074.</code><span><code>                </code><span style="margin-left: 48px !important;"><code style="color: #000;">cmdAdd.Visible = </code><code style="color: #069; font-weight: bold;">False</code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">075.</code><span><code>                </code><span style="margin-left: 48px !important;"><code style="color: #000;">cmdCancel.Visible = </code><code style="color: #069; font-weight: bold;">False</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">076.</code><span><code>                </code><span style="margin-left: 48px !important;"><code style="color: #000;">ToggleTextBoxReadOnly(</code><code style="color: #069; font-weight: bold;">True</code><code style="color: #000;">) </code><code style="color: #008200;">'Make the textboxes read only </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">077.</code><span><code>            </code><span style="margin-left: 36px !important;"><code style="color: #069; font-weight: bold;">ElseIf</code> <code style="color: #000;">cmdAdd.Text = </code><code style="color: blue;">"Modify"</code> <code style="color: #069; font-weight: bold;">Then</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">078.</code><span><code>                </code><span style="margin-left: 48px !important;"><code style="color: #000;">updateRecord(MINUTESDataSet.MINUTES(HScrollBar.Value).sno) </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">079.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">080.</code><span><code>                </code><span style="margin-left: 48px !important;"><code style="color: #000;">cmdAdd.Visible = </code><code style="color: #069; font-weight: bold;">False</code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">081.</code><span><code>                </code><span style="margin-left: 48px !important;"><code style="color: #000;">cmdCancel.Visible = </code><code style="color: #069; font-weight: bold;">False</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">082.</code><span><code>                </code><span style="margin-left: 48px !important;"><code style="color: #000;">ToggleTextBoxReadOnly(</code><code style="color: #069; font-weight: bold;">True</code><code style="color: #000;">) </code><code style="color: #008200;">'Make the textboxes read only </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">083.</code><span><code>            </code><span style="margin-left: 36px !important;"><code style="color: #069; font-weight: bold;">End</code> <code style="color: #069; font-weight: bold;">If</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">084.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #069; font-weight: bold;">End</code> <code style="color: #069; font-weight: bold;">If</code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">085.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">End</code> <code style="color: #069; font-weight: bold;">Sub</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">086.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">087.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">Private</code> <code style="color: #069; font-weight: bold;">Function</code> <code style="color: #000;">validateControls() </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #069; font-weight: bold;">Boolean</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">088.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #069; font-weight: bold;">If</code> <code style="color: #000;">txtName.Text <> </code><code style="color: blue;">""</code> <code style="color: #069; font-weight: bold;">And</code> <code style="color: #000;">txtMobileNumber.Text <> </code><code style="color: blue;">""</code> <code style="color: #069; font-weight: bold;">And</code> <code style="color: #000;">txtMobileNumber.TextLength > 9 </code><code style="color: #069; font-weight: bold;">And</code> <code style="color: #000;">txtMobileNumber.TextLength < 14 </code><code style="color: #069; font-weight: bold;">Then</code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">089.</code><span><code>            </code><span style="margin-left: 36px !important;"><code style="color: #000;">validateControls = </code><code style="color: #069; font-weight: bold;">True</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">090.</code><span><code>            </code><span style="margin-left: 36px !important;"><code style="color: #069; font-weight: bold;">Exit</code> <code style="color: #069; font-weight: bold;">Function</code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">091.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #069; font-weight: bold;">End</code> <code style="color: #069; font-weight: bold;">If</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">092.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">093.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">showMessage(</code><code style="color: blue;">"Please enter information in mandatory fields."</code><code style="color: #000;">) </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">094.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">validateControls = </code><code style="color: #069; font-weight: bold;">False</code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">095.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">End</code> <code style="color: #069; font-weight: bold;">Function</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">096.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">097.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">Private</code> <code style="color: #069; font-weight: bold;">Sub</code> <code style="color: #000;">ToggleTextBoxReadOnly(</code><code style="color: #069; font-weight: bold;">ByVal</code> <code style="color: #000;">flag </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #069; font-weight: bold;">Boolean</code><code style="color: #000;">) </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">098.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">tabDetView.BringToFront() </code><code style="color: #008200;">'Gives focus to Detail View screen but does not activate it </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">099.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">100.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">txtName.</code><code style="color: #069; font-weight: bold;">ReadOnly</code> <code style="color: #000;">= flag </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">101.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">txtName.Text = </code><code style="color: blue;">""</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">102.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">103.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">DateTimePicker.Enabled = IIf(flag = </code><code style="color: #069; font-weight: bold;">True</code><code style="color: #000;">, </code><code style="color: #069; font-weight: bold;">False</code><code style="color: #000;">, </code><code style="color: #069; font-weight: bold;">True</code><code style="color: #000;">) </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">104.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">cmdAdd.Visible = IIf(flag = </code><code style="color: #069; font-weight: bold;">True</code><code style="color: #000;">, </code><code style="color: #069; font-weight: bold;">False</code><code style="color: #000;">, </code><code style="color: #069; font-weight: bold;">True</code><code style="color: #000;">) </code><code style="color: #008200;">'Add Record button is enabled </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">105.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">cmdCancel.Visible = IIf(flag = </code><code style="color: #069; font-weight: bold;">True</code><code style="color: #000;">, </code><code style="color: #069; font-weight: bold;">False</code><code style="color: #000;">, </code><code style="color: #069; font-weight: bold;">True</code><code style="color: #000;">) </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">106.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">107.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">txtMobileNumber.</code><code style="color: #069; font-weight: bold;">ReadOnly</code> <code style="color: #000;">= flag </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">108.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">txtMobileNumber.Text = </code><code style="color: blue;">""</code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">109.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">110.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">txtNotes.</code><code style="color: #069; font-weight: bold;">ReadOnly</code> <code style="color: #000;">= flag </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">111.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">txtNotes.Text = </code><code style="color: blue;">""</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">112.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">113.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">MenuItem.Enabled = flag </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">114.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">HScrollBar.Enabled = flag </code><code style="color: #008200;">'Scroll bar is also toggled to avoid data loss </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">115.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">116.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #008200;">'Fires the initialization of Detail View </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">117.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #069; font-weight: bold;">If</code> <code style="color: #000;">flag = </code><code style="color: #069; font-weight: bold;">True</code> <code style="color: #069; font-weight: bold;">Then</code> <code style="color: #000;">bdTabControl.SelectedIndex = 0 </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">118.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">End</code> <code style="color: #069; font-weight: bold;">Sub</code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">119.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">120.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">Private</code> <code style="color: #069; font-weight: bold;">Sub</code> <code style="color: #000;">MenuAdd_Click(</code><code style="color: #069; font-weight: bold;">ByVal</code> <code style="color: #000;">sender </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #000;">System.</code><code style="color: #069; font-weight: bold;">Object</code><code style="color: #000;">, </code><code style="color: #069; font-weight: bold;">ByVal</code> <code style="color: #000;">e </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #000;">System.EventArgs) </code><code style="color: #069; font-weight: bold;">Handles</code> <code style="color: #000;">MenuAdd.Click </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">121.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">ToggleTextBoxReadOnly(</code><code style="color: #069; font-weight: bold;">False</code><code style="color: #000;">) </code><code style="color: #008200;">'Enable textboxes for data entry </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">122.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">txtName.Focus() </code><code style="color: #008200;">'Gives focus to First text box (txtname) </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">123.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">cmdAdd.Text = </code><code style="color: blue;">"Update"</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">124.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">DateTimePicker.Value = Now().ToShortDateString() </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">125.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">End</code> <code style="color: #069; font-weight: bold;">Sub</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">126.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">127.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">Private</code> <code style="color: #069; font-weight: bold;">Sub</code> <code style="color: #000;">cmdCancel_Click(</code><code style="color: #069; font-weight: bold;">ByVal</code> <code style="color: #000;">sender </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #000;">System.</code><code style="color: #069; font-weight: bold;">Object</code><code style="color: #000;">, </code><code style="color: #069; font-weight: bold;">ByVal</code> <code style="color: #000;">e </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #000;">System.EventArgs) </code><code style="color: #069; font-weight: bold;">Handles</code> <code style="color: #000;">cmdCancel.Click </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">128.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">cmdAdd.Visible = </code><code style="color: #069; font-weight: bold;">False</code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">129.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">cmdCancel.Visible = </code><code style="color: #069; font-weight: bold;">False</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">130.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">ToggleTextBoxReadOnly(</code><code style="color: #069; font-weight: bold;">True</code><code style="color: #000;">) </code><code style="color: #008200;">'Make the textboxes read only </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">131.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">End</code> <code style="color: #069; font-weight: bold;">Sub</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">132.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">133.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">Private</code> <code style="color: #069; font-weight: bold;">Sub</code> <code style="color: #000;">showMessage(</code><code style="color: #069; font-weight: bold;">ByVal</code> <code style="color: #000;">strMsg </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #069; font-weight: bold;">String</code><code style="color: #000;">) </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">134.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">MsgBox(strMsg, MsgBoxStyle.Information, </code><code style="color: #069; font-weight: bold;">Me</code><code style="color: #000;">.Text) </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">135.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">End</code> <code style="color: #069; font-weight: bold;">Sub</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">136.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">137.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">Private</code> <code style="color: #069; font-weight: bold;">Sub</code> <code style="color: #000;">txtMobileNumber_KeyPress(</code><code style="color: #069; font-weight: bold;">ByVal</code> <code style="color: #000;">sender </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #069; font-weight: bold;">Object</code><code style="color: #000;">, </code><code style="color: #069; font-weight: bold;">ByVal</code> <code style="color: #000;">e </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #000;">System.Windows.Forms.KeyPressEventArgs) </code><code style="color: #069; font-weight: bold;">Handles</code> <code style="color: #000;">txtMobileNumber.KeyPress </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">138.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #008200;">'Convert.ToInt16(e.KeyChar) <> 8 is for ignoring backspace key </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">139.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #069; font-weight: bold;">If</code> <code style="color: #000;">txtMobileNumber.</code><code style="color: #069; font-weight: bold;">ReadOnly</code> <code style="color: #000;">= </code><code style="color: #069; font-weight: bold;">False</code> <code style="color: #069; font-weight: bold;">And</code> <code style="color: #000;">IsNumeric(e.KeyChar) = </code><code style="color: #069; font-weight: bold;">False</code> <code style="color: #069; font-weight: bold;">And</code> <code style="color: #000;">Convert.ToInt16(e.KeyChar) <> 8 </code><code style="color: #069; font-weight: bold;">Then</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">140.</code><span><code>            </code><span style="margin-left: 36px !important;"><code style="color: #000;">txtMobileNumber.Text = </code><code style="color: blue;">""</code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">141.</code><span><code>            </code><span style="margin-left: 36px !important;"><code style="color: #000;">showMessage(</code><code style="color: blue;">"Please enter numbers only for mobile number."</code><code style="color: #000;">) </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">142.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #069; font-weight: bold;">End</code> <code style="color: #069; font-weight: bold;">If</code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">143.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">End</code> <code style="color: #069; font-weight: bold;">Sub</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">144.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">145.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">Private</code> <code style="color: #069; font-weight: bold;">Sub</code> <code style="color: #000;">addNewData(</code><code style="color: #069; font-weight: bold;">Optional</code> <code style="color: #069; font-weight: bold;">ByVal</code> <code style="color: #000;">sno </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #069; font-weight: bold;">Integer</code> <code style="color: #000;">= 0) </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">146.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">MINUTESTableAdapter.Insert(txtName.Text, DateTimePicker.Value, _ </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">147.</code><span><code>                                        </code><span style="margin-left: 120px !important;"><code style="color: #000;">txtMobileNumber.Text, txtNotes.Text) </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">148.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">149.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">MINUTESTableAdapter.Fill(MINUTESDataSet.MINUTES) </code><code style="color: #008200;">'Refill the table with new row </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">150.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">151.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #069; font-weight: bold;">If</code> <code style="color: #000;">sno = 0 </code><code style="color: #069; font-weight: bold;">Then</code> <code style="color: #000;">showMessage(</code><code style="color: blue;">"Entry added successfully."</code><code style="color: #000;">) </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">152.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">HScrollBar.Value = 0 </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">153.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">End</code> <code style="color: #069; font-weight: bold;">Sub</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">154.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">155.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">Private</code> <code style="color: #069; font-weight: bold;">Sub</code> <code style="color: #000;">HScrollBar_ValueChanged(</code><code style="color: #069; font-weight: bold;">ByVal</code> <code style="color: #000;">sender </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #000;">System.</code><code style="color: #069; font-weight: bold;">Object</code><code style="color: #000;">, </code><code style="color: #069; font-weight: bold;">ByVal</code> <code style="color: #000;">e </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #000;">System.EventArgs) </code><code style="color: #069; font-weight: bold;">Handles</code> <code style="color: #000;">HScrollBar.ValueChanged </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">156.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">showDataInForm() </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">157.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">End</code> <code style="color: #069; font-weight: bold;">Sub</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">158.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">159.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">Private</code> <code style="color: #069; font-weight: bold;">Sub</code> <code style="color: #000;">MenuModify_Click(</code><code style="color: #069; font-weight: bold;">ByVal</code> <code style="color: #000;">sender </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #000;">System.</code><code style="color: #069; font-weight: bold;">Object</code><code style="color: #000;">, </code><code style="color: #069; font-weight: bold;">ByVal</code> <code style="color: #000;">e </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #000;">System.EventArgs) </code><code style="color: #069; font-weight: bold;">Handles</code> <code style="color: #000;">MenuModify.Click </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">160.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">ToggleTextBoxReadOnly(</code><code style="color: #069; font-weight: bold;">False</code><code style="color: #000;">) </code><code style="color: #008200;">'Enable textboxes for data entry </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">161.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">showDataInForm() </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">162.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">txtName.Focus() </code><code style="color: #008200;">'Gives focus to First text box (txtname) </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">163.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">cmdAdd.Text = </code><code style="color: blue;">"Modify"</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">164.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">End</code> <code style="color: #069; font-weight: bold;">Sub</code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">165.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">166.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">Private</code> <code style="color: #069; font-weight: bold;">Sub</code> <code style="color: #000;">MenuDelete_Click(</code><code style="color: #069; font-weight: bold;">ByVal</code> <code style="color: #000;">sender </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #000;">System.</code><code style="color: #069; font-weight: bold;">Object</code><code style="color: #000;">, </code><code style="color: #069; font-weight: bold;">ByVal</code> <code style="color: #000;">e </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #000;">System.EventArgs) </code><code style="color: #069; font-weight: bold;">Handles</code> <code style="color: #000;">MenuDelete.Click </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">167.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #069; font-weight: bold;">Dim</code> <code style="color: #000;">ans </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #069; font-weight: bold;">Integer</code> <code style="color: #000;">= MsgBox(</code><code style="color: blue;">"Are you sure you wish to delete the current record?"</code><code style="color: #000;">, MsgBoxStyle.YesNo, </code><code style="color: #069; font-weight: bold;">Me</code><code style="color: #000;">.Text) </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">168.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">169.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #069; font-weight: bold;">If</code> <code style="color: #000;">ans = 6 </code><code style="color: #069; font-weight: bold;">Then</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">170.</code><span><code>            </code><span style="margin-left: 36px !important;"><code style="color: #000;">MINUTESTableAdapter.Delete(MINUTESDataSet.MINUTES(HScrollBar.Value).sno) </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">171.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">172.</code><span><code>            </code><span style="margin-left: 36px !important;"><code style="color: #000;">MINUTESTableAdapter.Fill(MINUTESDataSet.MINUTES) </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">173.</code><span><code>            </code><span style="margin-left: 36px !important;"><code style="color: #000;">bdTabControl.SelectedIndex = 0 </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">174.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #069; font-weight: bold;">End</code> <code style="color: #069; font-weight: bold;">If</code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">175.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">End</code> <code style="color: #069; font-weight: bold;">Sub</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">176.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">177.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">Private</code> <code style="color: #069; font-weight: bold;">Sub</code> <code style="color: #000;">MenuCheckBD_Click(</code><code style="color: #069; font-weight: bold;">ByVal</code> <code style="color: #000;">sender </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #000;">System.</code><code style="color: #069; font-weight: bold;">Object</code><code style="color: #000;">, </code><code style="color: #069; font-weight: bold;">ByVal</code> <code style="color: #000;">e </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #000;">System.EventArgs) </code><code style="color: #069; font-weight: bold;">Handles</code> <code style="color: #000;">MenuCheckMn.Click </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">178.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">checkminutes() </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">179.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">End</code> <code style="color: #069; font-weight: bold;">Sub</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">180.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">181.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">Private</code> <code style="color: #069; font-weight: bold;">Sub</code> <code style="color: #000;">cmdStop_Click(</code><code style="color: #069; font-weight: bold;">ByVal</code> <code style="color: #000;">sender </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #000;">System.</code><code style="color: #069; font-weight: bold;">Object</code><code style="color: #000;">, </code><code style="color: #069; font-weight: bold;">ByVal</code> <code style="color: #000;">e </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #000;">System.EventArgs) </code><code style="color: #069; font-weight: bold;">Handles</code> <code style="color: #000;">cmdStop.Click </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">182.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">Timer.Interval = 0 </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">183.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">Timer.Enabled = </code><code style="color: #069; font-weight: bold;">False</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">184.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">cmdStop.Visible = </code><code style="color: #069; font-weight: bold;">False</code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">185.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">End</code> <code style="color: #069; font-weight: bold;">Sub</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">186.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">187.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">Private</code> <code style="color: #069; font-weight: bold;">Sub</code> <code style="color: #000;">Timer_Tick(</code><code style="color: #069; font-weight: bold;">ByVal</code> <code style="color: #000;">sender </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #000;">System.</code><code style="color: #069; font-weight: bold;">Object</code><code style="color: #000;">, </code><code style="color: #069; font-weight: bold;">ByVal</code> <code style="color: #000;">e </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #000;">System.EventArgs) </code><code style="color: #069; font-weight: bold;">Handles</code> <code style="color: #000;">Timer.Tick </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">188.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">Application.</code><code style="color: #069; font-weight: bold;">Exit</code><code style="color: #000;">() </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">189.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">End</code> <code style="color: #069; font-weight: bold;">Sub</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">190.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">191.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">Private</code> <code style="color: #069; font-weight: bold;">Sub</code> <code style="color: #000;">frmMain_Load(</code><code style="color: #069; font-weight: bold;">ByVal</code> <code style="color: #000;">sender </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #069; font-weight: bold;">Object</code><code style="color: #000;">, </code><code style="color: #069; font-weight: bold;">ByVal</code> <code style="color: #000;">e </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #000;">System.EventArgs) </code><code style="color: #069; font-weight: bold;">Handles</code> <code style="color: #069; font-weight: bold;">MyBase</code><code style="color: #000;">.Load </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">192.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #069; font-weight: bold;">Dim</code> <code style="color: #000;">st </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #069; font-weight: bold;">New</code> <code style="color: #000;">StreamReader(System.IO.Path.GetDirectoryName(System.Reflection.</code><code style="color: #069; font-weight: bold;">Assembly</code><code style="color: #000;">.GetExecutingAssembly().GetName().CodeBase) & </code><code style="color: blue;">"\txtMsg.txt"</code><code style="color: #000;">) </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">193.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">194.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">txtMessage.Text = st.ReadToEnd() </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">195.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">checkminutes() </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">196.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">197.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">st.Close() </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">198.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">End</code> <code style="color: #069; font-weight: bold;">Sub</code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">199.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">200.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">Private</code> <code style="color: #069; font-weight: bold;">Sub</code> <code style="color: #000;">checkminutes() </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">201.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #069; font-weight: bold;">Dim</code> <code style="color: #000;">i </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #069; font-weight: bold;">Integer</code> <code style="color: #000;">= 0 </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">202.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">203.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #069; font-weight: bold;">Try</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">204.</code><span><code>            </code><span style="margin-left: 36px !important;"><code style="color: #069; font-weight: bold;">For</code> <code style="color: #000;">i = 0 </code><code style="color: #069; font-weight: bold;">To</code> <code style="color: #000;">MINUTESDataSet.MINUTES.Rows.Count - 1 </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">205.</code><span><code>                </code><span style="margin-left: 48px !important;"><code style="color: #069; font-weight: bold;">If</code> <code style="color: #000;">MINUTESDataSet.MINUTES(i).dateOfMeeting.Day = </code><code style="color: #069; font-weight: bold;">Date</code><code style="color: #000;">.Now.Day </code><code style="color: #069; font-weight: bold;">And</code> <code style="color: #000;">MINUTESDataSet.MINUTES(i).dateOfMeeting.</code><code style="color: #069; font-weight: bold;">Date</code><code style="color: #000;">.Month = </code><code style="color: #069; font-weight: bold;">Date</code><code style="color: #000;">.Now.Month </code><code style="color: #069; font-weight: bold;">Then</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">206.</code><span><code>                    </code><span style="margin-left: 60px !important;"><code style="color: #069; font-weight: bold;">Dim</code> <code style="color: #000;">sms </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #069; font-weight: bold;">New</code> <code style="color: #000;">SmsMessage(MINUTESDataSet.MINUTES(i).mobileNumber, _ </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">207.</code><span><code>                                        </code><span style="margin-left: 120px !important;"><code style="color: blue;">"Hi "</code> <code style="color: #000;">& MINUTESDataSet.MINUTES(i).Agenda & vbCrLf & txtMessage.Text) </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">208.</code><span><code>                    </code><span style="margin-left: 60px !important;"><code style="color: #000;">sms.Send() </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">209.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">210.</code><span><code>                    </code><span style="margin-left: 60px !important;"><code style="color: #069; font-weight: bold;">Dim</code> <code style="color: #000;">sms2 </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #069; font-weight: bold;">New</code> <code style="color: #000;">SmsMessage(</code><code style="color: blue;">"+999999999999"</code><code style="color: #000;">, _ </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">211.</code><span><code>                                        </code><span style="margin-left: 120px !important;"><code style="color: blue;">"Hi "</code> <code style="color: #000;">& MINUTESDataSet.MINUTES(i).Agenda & vbCrLf & txtMessage.Text) </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">212.</code><span><code>                    </code><span style="margin-left: 60px !important;"><code style="color: #000;">sms2.Send() </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">213.</code><span><code>                </code><span style="margin-left: 48px !important;"><code style="color: #069; font-weight: bold;">End</code> <code style="color: #069; font-weight: bold;">If</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">214.</code><span><code>            </code><span style="margin-left: 36px !important;"><code style="color: #069; font-weight: bold;">Next</code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">215.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #069; font-weight: bold;">Catch</code> <code style="color: #000;">ex </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #000;">Exception </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">216.</code><span><code>            </code><span style="margin-left: 36px !important;"><code style="color: #000;">showMessage(</code><code style="color: blue;">"The database is empty. Fill some entries year."</code><code style="color: #000;">) </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">217.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #069; font-weight: bold;">End</code> <code style="color: #069; font-weight: bold;">Try</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">218.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">End</code> <code style="color: #069; font-weight: bold;">Sub</code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">219.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">220.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">Private</code> <code style="color: #069; font-weight: bold;">Sub</code> <code style="color: #000;">updateRecord(</code><code style="color: #069; font-weight: bold;">ByVal</code> <code style="color: #000;">sno </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #069; font-weight: bold;">Integer</code><code style="color: #000;">) </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">221.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #008200;">'Delete that entry </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">222.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">MINUTESTableAdapter.Delete(MINUTESDataSet.MINUTES(HScrollBar.Value).sno) </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">223.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">MINUTESTableAdapter.Fill(MINUTESDataSet.MINUTES) </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">224.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">225.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #008200;">'Add new row for that (Direct Update not supported) </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">226.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">addNewData(sno) </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">227.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">228.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">MINUTESTableAdapter.Fill(MINUTESDataSet.MINUTES) </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">229.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">showMessage(</code><code style="color: blue;">"Entry modified successfully."</code><code style="color: #000;">) </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">230.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">HScrollBar.Value = 0 </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">231.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">End</code> <code style="color: #069; font-weight: bold;">Sub</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">232.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">233.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">Private</code> <code style="color: #069; font-weight: bold;">Function</code> <code style="color: #000;">getResult4mQuery(</code><code style="color: #069; font-weight: bold;">ByVal</code> <code style="color: #000;">strQuery </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #069; font-weight: bold;">String</code><code style="color: #000;">) </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #069; font-weight: bold;">Integer</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">234.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #069; font-weight: bold;">Dim</code> <code style="color: #000;">cn </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #069; font-weight: bold;">New</code> <code style="color: #000;">Data.SqlServerCe.SqlCeConnection(</code><code style="color: blue;">"Data Source="</code> <code style="color: #000;">& System.IO.Path.GetDirectoryName(System.Reflection.</code><code style="color: #069; font-weight: bold;">Assembly</code><code style="color: #000;">.GetExecutingAssembly().GetName().CodeBase) & </code><code style="color: blue;">"\MINUTES.sdf; Password=alwahco"</code><code style="color: #000;">) </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">235.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #069; font-weight: bold;">Dim</code> <code style="color: #000;">cmd </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #069; font-weight: bold;">New</code> <code style="color: #000;">Data.SqlServerCe.SqlCeCommand(strQuery, cn) </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">236.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #069; font-weight: bold;">Dim</code> <code style="color: #000;">dr </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #000;">Data.SqlServerCe.SqlCeDataReader </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">237.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">238.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">cn.Open() </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">239.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">cmd.CommandType = Data.CommandType.Text </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">240.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">dr = cmd.ExecuteReader() </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">241.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">dr.Read() </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">242.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">getResult4mQuery = dr(0) </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">243.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">244.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000;">cn.Close() </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">245.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">End</code> <code style="color: #069; font-weight: bold;">Function</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">246.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">247.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">Private</code> <code style="color: #069; font-weight: bold;">Sub</code> <code style="color: #000;">cmdEditMsg_Click(</code><code style="color: #069; font-weight: bold;">ByVal</code> <code style="color: #000;">sender </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #000;">System.</code><code style="color: #069; font-weight: bold;">Object</code><code style="color: #000;">, </code><code style="color: #069; font-weight: bold;">ByVal</code> <code style="color: #000;">e </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #000;">System.EventArgs) </code><code style="color: #069; font-weight: bold;">Handles</code> <code style="color: #000;">cmdEditMsg.Click </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">248.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #069; font-weight: bold;">If</code> <code style="color: #000;">cmdEditMsg.Text = </code><code style="color: blue;">"Edit Message"</code> <code style="color: #069; font-weight: bold;">Then</code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">249.</code><span><code>            </code><span style="margin-left: 36px !important;"><code style="color: #000;">cmdEditMsg.Text = </code><code style="color: blue;">"Save Message"</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">250.</code><span><code>            </code><span style="margin-left: 36px !important;"><code style="color: #000;">txtMessage.</code><code style="color: #069; font-weight: bold;">ReadOnly</code> <code style="color: #000;">= </code><code style="color: #069; font-weight: bold;">False</code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">251.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #069; font-weight: bold;">Else</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">252.</code><span><code>            </code><span style="margin-left: 36px !important;"><code style="color: #069; font-weight: bold;">Try</code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">253.</code><span><code>                </code><span style="margin-left: 48px !important;"><code style="color: #069; font-weight: bold;">Dim</code> <code style="color: #000;">sw </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #069; font-weight: bold;">New</code> <code style="color: #000;">StreamWriter(System.IO.Path.GetDirectoryName(System.Reflection.</code><code style="color: #069; font-weight: bold;">Assembly</code><code style="color: #000;">.GetExecutingAssembly().GetName().CodeBase) & </code><code style="color: blue;">"\txtMsg.txt"</code><code style="color: #000;">) </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">254.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">255.</code><span><code>                </code><span style="margin-left: 48px !important;"><code style="color: #000;">sw.Write(txtMessage.Text) </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">256.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">257.</code><span><code>                </code><span style="margin-left: 48px !important;"><code style="color: #000;">sw.Close() </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">258.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">259.</code><span><code>                </code><span style="margin-left: 48px !important;"><code style="color: #000;">cmdEditMsg.Text = </code><code style="color: blue;">"Edit Message"</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">260.</code><span><code>                </code><span style="margin-left: 48px !important;"><code style="color: #000;">txtMessage.</code><code style="color: #069; font-weight: bold;">ReadOnly</code> <code style="color: #000;">= </code><code style="color: #069; font-weight: bold;">True</code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">261.</code><span><code>            </code><span style="margin-left: 36px !important;"><code style="color: #069; font-weight: bold;">Catch</code> <code style="color: #000;">ex </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #000;">Exception </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">262.</code><span><code>                </code><span style="margin-left: 48px !important;"><code style="color: #000;">MsgBox(ex.Message) </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">263.</code><span><code>            </code><span style="margin-left: 36px !important;"><code style="color: #069; font-weight: bold;">End</code> <code style="color: #069; font-weight: bold;">Try</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">264.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #069; font-weight: bold;">End</code> <code style="color: #069; font-weight: bold;">If</code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">265.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">End</code> <code style="color: #069; font-weight: bold;">Sub</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">266.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">267.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">Private</code> <code style="color: #069; font-weight: bold;">Sub</code> <code style="color: #000;">DataGrid_CurrentCellChanged(</code><code style="color: #069; font-weight: bold;">ByVal</code> <code style="color: #000;">sender </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #000;">System.</code><code style="color: #069; font-weight: bold;">Object</code><code style="color: #000;">, </code><code style="color: #069; font-weight: bold;">ByVal</code> <code style="color: #000;">e </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #000;">System.EventArgs) </code><code style="color: #069; font-weight: bold;">Handles</code> <code style="color: #000;">DataGrid.CurrentCellChanged </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">268.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">269.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">End</code> <code style="color: #069; font-weight: bold;">Sub</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">270.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">271.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">Private</code> <code style="color: #069; font-weight: bold;">Sub</code> <code style="color: #000;">lblDetails_ParentChanged(</code><code style="color: #069; font-weight: bold;">ByVal</code> <code style="color: #000;">sender </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #000;">System.</code><code style="color: #069; font-weight: bold;">Object</code><code style="color: #000;">, </code><code style="color: #069; font-weight: bold;">ByVal</code> <code style="color: #000;">e </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #000;">System.EventArgs) </code><code style="color: #069; font-weight: bold;">Handles</code> <code style="color: #000;">lblDetails.ParentChanged </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">272.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">273.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">End</code> <code style="color: #069; font-weight: bold;">Sub</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">274.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">275.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">Private</code> <code style="color: #069; font-weight: bold;">Sub</code> <code style="color: #000;">lblTitle_ParentChanged(</code><code style="color: #069; font-weight: bold;">ByVal</code> <code style="color: #000;">sender </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #000;">System.</code><code style="color: #069; font-weight: bold;">Object</code><code style="color: #000;">, </code><code style="color: #069; font-weight: bold;">ByVal</code> <code style="color: #000;">e </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #000;">System.EventArgs) </code><code style="color: #069; font-weight: bold;">Handles</code> <code style="color: #000;">lblTitle.ParentChanged </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">276.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">277.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">End</code> <code style="color: #069; font-weight: bold;">Sub</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">278.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">279.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">Private</code> <code style="color: #069; font-weight: bold;">Sub</code> <code style="color: #000;">BDayBindingSource_CurrentChanged(</code><code style="color: #069; font-weight: bold;">ByVal</code> <code style="color: #000;">sender </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #000;">System.</code><code style="color: #069; font-weight: bold;">Object</code><code style="color: #000;">, </code><code style="color: #069; font-weight: bold;">ByVal</code> <code style="color: #000;">e </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #000;">System.EventArgs) </code><code style="color: #069; font-weight: bold;">Handles</code> <code style="color: #000;">mINUTESBindingSource.CurrentChanged </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">280.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">281.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">End</code> <code style="color: #069; font-weight: bold;">Sub</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">282.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">283.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">Private</code> <code style="color: #069; font-weight: bold;">Sub</code> <code style="color: #000;">MenuItem_Click(</code><code style="color: #069; font-weight: bold;">ByVal</code> <code style="color: #000;">sender </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #000;">System.</code><code style="color: #069; font-weight: bold;">Object</code><code style="color: #000;">, </code><code style="color: #069; font-weight: bold;">ByVal</code> <code style="color: #000;">e </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #000;">System.EventArgs) </code><code style="color: #069; font-weight: bold;">Handles</code> <code style="color: #000;">MenuItem.Click </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">284.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">285.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">End</code> <code style="color: #069; font-weight: bold;">Sub</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">286.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">287.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">Private</code> <code style="color: #069; font-weight: bold;">Sub</code> <code style="color: #000;">frmMain_KeyDown(</code><code style="color: #069; font-weight: bold;">ByVal</code> <code style="color: #000;">sender </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #000;">System.</code><code style="color: #069; font-weight: bold;">Object</code><code style="color: #000;">, </code><code style="color: #069; font-weight: bold;">ByVal</code> <code style="color: #000;">e </code><code style="color: #069; font-weight: bold;">As</code> <code style="color: #000;">System.Windows.Forms.KeyEventArgs) </code><code style="color: #069; font-weight: bold;">Handles</code> <code style="color: #069; font-weight: bold;">MyBase</code><code style="color: #000;">.KeyDown </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">288.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #069; font-weight: bold;">If</code> <code style="color: #000;">(e.KeyCode = System.Windows.Forms.Keys.Up) </code><code style="color: #069; font-weight: bold;">Then</code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">289.</code><span><code>            </code><span style="margin-left: 36px !important;"><code style="color: #008200;">'Up </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">290.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #069; font-weight: bold;">End</code> <code style="color: #069; font-weight: bold;">If</code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">291.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #069; font-weight: bold;">If</code> <code style="color: #000;">(e.KeyCode = System.Windows.Forms.Keys.Down) </code><code style="color: #069; font-weight: bold;">Then</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">292.</code><span><code>            </code><span style="margin-left: 36px !important;"><code style="color: #008200;">'Down </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">293.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #069; font-weight: bold;">End</code> <code style="color: #069; font-weight: bold;">If</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">294.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #069; font-weight: bold;">If</code> <code style="color: #000;">(e.KeyCode = System.Windows.Forms.Keys.Left) </code><code style="color: #069; font-weight: bold;">Then</code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">295.</code><span><code>            </code><span style="margin-left: 36px !important;"><code style="color: #008200;">'Left </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">296.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #069; font-weight: bold;">End</code> <code style="color: #069; font-weight: bold;">If</code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">297.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #069; font-weight: bold;">If</code> <code style="color: #000;">(e.KeyCode = System.Windows.Forms.Keys.Right) </code><code style="color: #069; font-weight: bold;">Then</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">298.</code><span><code>            </code><span style="margin-left: 36px !important;"><code style="color: #008200;">'Right </code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">299.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #069; font-weight: bold;">End</code> <code style="color: #069; font-weight: bold;">If</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">300.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #069; font-weight: bold;">If</code> <code style="color: #000;">(e.KeyCode = System.Windows.Forms.Keys.Enter) </code><code style="color: #069; font-weight: bold;">Then</code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">301.</code><span><code>            </code><span style="margin-left: 36px !important;"><code style="color: #008200;">'Enter </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">302.</code><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #069; font-weight: bold;">End</code> <code style="color: #069; font-weight: bold;">If</code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">303.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">304.</code><span><code>    </code><span style="margin-left: 12px !important;"><code style="color: #069; font-weight: bold;">End</code> <code style="color: #069; font-weight: bold;">Sub</code></span></span></div> <div style="background-color: #fff;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">305.</code><span><code> </code><span style="margin-left: 3px !important;"> </span></span></div> <div style="background-color: #f8f8f8;"><code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;">306.</code><span style="margin-left: 0px !important;"><code style="color: #069; font-weight: bold;">End</code> <code style="color: #069; font-weight: bold;">Class</code></span></div> </div> <span style="font-family: tahoma, sans-serif; font-size: 10pt;"> <p> </p> </span> <p> </p> </div> <div> <p><span style="font-family: tahoma, sans-serif; font-size: 10pt;"> </span></p> </div> <div> <p><span style="font-family: tahoma, sans-serif; font-size: 10pt;">Kind regards </span></p> </div> <div> <p><span style="font-family: tahoma, sans-serif; font-size: 10pt;"> </span></p> </div> <div> <p><span style="font-family: tahoma, sans-serif; font-size: 10pt;">Allaign<br clear="all" /> </span></p> </div> http://www.silverlightshow.net/items/Windows-Phone-7.5-Use-Background-agents.aspx#comment8432 alwahco http://www.silverlightshow.net/items/Windows-Phone-7.5-Use-Background-agents.aspx Wed, 05 Sep 2012 15:42:16 GMT Re: Windows Phone 7.5 - Use Background agents It's such a disadvantage that these two tasks aren't more flexible - resource and development-wise. You would think that a Windows phone would be built to overcome these issues that cause such an inconvenience to the user. Then again, to be able to access PC features and sync them with your phone is a godsend to people on the go like me. I'm sure the next version will surpass 7.5 immensely! http://www.silverlightshow.net/items/Windows-Phone-7.5-Use-Background-agents.aspx#comment8045 JonBonning http://www.silverlightshow.net/items/Windows-Phone-7.5-Use-Background-agents.aspx Fri, 11 May 2012 14:41:20 GMT Re: Windows Phone 7.5 - Use Background agents It's such a disadvantage that these two tasks aren't more flexible - resource and development-wise. You would think that a Windows phone would be built to overcome these issues that cause such an inconvenience to the user. Then again, to be able to access PC features and sync them with your phone is a godsend to people on the go like me. I'm sure the next version will surpass 7.5 immensely! http://www.silverlightshow.net/items/Windows-Phone-7.5-Use-Background-agents.aspx#comment8044 JonBonning http://www.silverlightshow.net/items/Windows-Phone-7.5-Use-Background-agents.aspx Fri, 11 May 2012 13:54:47 GMT Re: Windows Phone 7.5 - Use Background agents <p>Hi,</p> <p> I was having some problems with this approach (mind you, i have only tried this in the emulator)</p> <p>The problems i ran into was that the positionchanged event did not fire. This meant that the notifychanged was not called, which would cause problems with the scheduleagent. Another issue might be that the positionchanged could take longer than 15 seconds (typically, the scheduleagent should (can?) not exceed 15 seconds). To solve this problem i changed the oninvoke event handler to the following, which works better for me:</p> <p> </p> <pre style="font-family: consolas; font-size: 13px; color: black; background: none repeat scroll 0% 0% white;">            <span style="color: #2b91af;">GeoCoordinateWatcher</span> watcher = <span style="color: blue;">new</span> <span style="color: #2b91af;">GeoCoordinateWatcher</span>(<span style="color: #2b91af;">GeoPositionAccuracy</span>.High)             {                 MovementThreshold = 10             };             <strong>watcher.TryStart(<span style="color: blue;">false</span>, <span style="color: #2b91af;">TimeSpan</span>.FromMilliseconds(8000));</strong>             <span style="color: #2b91af;">GeoCoordinate</span> position = watcher.Position.Location;             <span style="color: blue;">if</span> (position.IsUnknown)             {                 <span style="color: #2b91af;">Random</span> rnd = <span style="color: blue;">new</span> <span style="color: #2b91af;">Random</span>(<span style="color: #2b91af;">DateTime</span>.Now.Millisecond);                 position = <span style="color: blue;">this</span>.PointOfInterests[rnd.Next(0, <span style="color: blue;">this</span>.PointOfInterests.Length - 1)];             }             <span style="color: blue;">this</span>.UpdateImage(position);<br /><br />Best regards<br />Arend Melissant<br /><br /></pre> http://www.silverlightshow.net/items/Windows-Phone-7.5-Use-Background-agents.aspx#comment8022 ArendMelissant http://www.silverlightshow.net/items/Windows-Phone-7.5-Use-Background-agents.aspx Thu, 03 May 2012 18:38:33 GMT