بطور مثال:
1- پروژه ای را ایجاد نمایید و یک کادر متن و دکمه درون آن قرار دهید.
2- بر روی رویداد ChangeUICues روی فرم قرار گرفته و کدهای زیر را بر روی آن وارد نمایید.
در زبان VB:
() Dim messageBoxVB As New System.Text.StringBuilder
messageBoxVB.AppendFormat("{0} = {1}", "ShowFocus", e.ShowFocus)
messageBoxVB.AppendLine()
messageBoxVB.AppendFormat("{0} = {1}", "ShowKeyboard", e.ShowKeyboard)
messageBoxVB.AppendLine()
messageBoxVB.AppendFormat("{0} = {1}", "ChangeFocus", e.ChangeFocus)
messageBoxVB.AppendLine()
messageBoxVB.AppendFormat("{0} = {1}", "ChangeKeyboard", e.ChangeKeyboard)
messageBoxVB.AppendLine()
messageBoxVB.AppendFormat("{0} = {1}", "Changed", e.Changed)
messageBoxVB.AppendLine()
MessageBox.Show(messageBoxVB.ToString(), "ChangeUICues Event")
messageBoxVB.AppendFormat("{0} = {1}", "ShowFocus", e.ShowFocus)
messageBoxVB.AppendLine()
messageBoxVB.AppendFormat("{0} = {1}", "ShowKeyboard", e.ShowKeyboard)
messageBoxVB.AppendLine()
messageBoxVB.AppendFormat("{0} = {1}", "ChangeFocus", e.ChangeFocus)
messageBoxVB.AppendLine()
messageBoxVB.AppendFormat("{0} = {1}", "ChangeKeyboard", e.ChangeKeyboard)
messageBoxVB.AppendLine()
messageBoxVB.AppendFormat("{0} = {1}", "Changed", e.Changed)
messageBoxVB.AppendLine()
MessageBox.Show(messageBoxVB.ToString(), "ChangeUICues Event")
در زبان #C:
System.Text.StringBuilder messageBoxCS = new System.Text.StringBuilder(); messageBoxCS.AppendFormat("{0} = {1}", "ShowFocus", e.ShowFocus ); messageBoxCS.AppendLine(); messageBoxCS.AppendFormat("{0} = {1}", "ShowKeyboard", e.ShowKeyboard ); messageBoxCS.AppendLine(); messageBoxCS.AppendFormat("{0} = {1}", "ChangeFocus", e.ChangeFocus ); messageBoxCS.AppendLine(); messageBoxCS.AppendFormat("{0} = {1}", "ChangeKeyboard", e.ChangeKeyboard ); messageBoxCS.AppendLine(); messageBoxCS.AppendFormat("{0} = {1}", "Changed", e.Changed ); messageBoxCS.AppendLine(); MessageBox.Show(messageBoxCS.ToString(), "ChangeUICues Event" );
3- پروژه را اجرا نمایید تا و نتیجه ای مانند شکل زیر را مشاهده نمایید.


لطفاً با نکته نظر های خود مرا در بهبود آموزش هرچه بهتر یاری نمایید
هر مطلبی اگر نا مفهوم بود کافی است در بخش نظرات بیان نمایید تا اصلاح شود