+ /// if (canSelect() && isMnemonic(charCode, getText()) {
+ /// // perform action associated with mnemonic
+ /// }
+ ///
+ ///
+ /// if (canSelect() && isMnemonic(charCode, getText()) {
+ /// // perform action associated with mnemonic
+ /// }
+ ///
+ /// Private Sub SetColumnAlternatingBackColor()
+ /// ' Create a color object.
+ /// Dim c As System.Drawing.Color
+ /// c = System.Drawing.Color.Yellow
+ /// ' Declare an object variable for the DataGridColumnStyle.
+ /// Dim myGridColumn As DataGridColumnStyle
+ /// myGridColumn = DataGrid1.GridColumns(0)
+ /// ' Set the AlternatingBackColor to the color object.
+ /// myGridColumn.AlternatingBackColor = c
+ /// End Sub
+ ///
+ ///
+ /// Dim c As System.Drawing.Color
+ /// Dim dgCol As DataGridColumnStyle
+ /// c = System.Drawing.CadetBlue
+ /// Set dgCol = DataGrid1.GridColumns(0)
+ /// dgCol.ForeColor = c
+ ///
+ ///
+ /// Private Sub PrintGridColumns()
+ /// Dim colsCount As Integer
+ /// colsCount = DataGrid1.GridColumns.Count
+ /// Dim i As Integer
+ /// For i = 0 to colsCount - 1
+ /// Debug.Print DataGrid1.GridColumns(i).GetType.ToString
+ /// Next i
+ /// End Sub
+ ///
+ ///
+ /// Private Sub EnumerateThroughGridColumns()
+ /// Dim ie As System.Collections.IEnumerator
+ /// Dim dgCol As DataGridColumn
+ /// Set ie = DataGrid1.GridColumns.GetEnumerator
+ /// Do While ie.GetNext = True
+ /// Set dgCol = ie.GetObject
+ /// Debug.Print dgCol.DataColumn.Caption
+ /// Loop
+ /// End Sub
+ ///
+ ///
+ /// Private Sub RemoveBoolColumns()
+ /// Dim ie As System.Collections.IEnumerator
+ /// Dim dgCol As DataGridColumn
+ /// Set ie = DataGrid1.GridColumns.GetEnumerator(true)
+ /// Do While ie.GetNext
+ /// Set dgCol = ie.GetObject
+ ///
+ /// If dgCol.ToString = "DataGridBoolColumn" Then
+ /// DataGrid1.GridColumns.Remove dgCol
+ /// End If
+ /// Loop
+ /// End If
+ ///
+ /// | "); + if (formattedValue != null) + { + FormatPlainTextAsHtml(formattedValue.ToString(), new StringWriter(sb, CultureInfo.CurrentCulture)); + } + else + { + sb.Append(" "); + } + sb.Append(" | "); + if (lastCell) + { + sb.Append("
| "); + if (val != null) + { + FormatPlainTextAsHtml(val.ToString(), new StringWriter(sb, CultureInfo.CurrentCulture)); + } + else + { + sb.Append(" "); + } + sb.Append(" | "); + if (lastCell) + { + sb.Append(""); + if (inLastRow) + { + sb.Append("
|---|
| "); + if (val != null) + { + sb.Append(""); + FormatPlainTextAsHtml(val.ToString(), new StringWriter(sb, CultureInfo.CurrentCulture)); + sb.Append(""); + } + else + { + sb.Append(" "); + } + sb.Append(" | "); + if (lastCell) + { + sb.Append("
+ /// ListBox lb = new ListBox();
+ /// // set up properties on the listbox here.
+ /// lb.Items.All = new String [] {
+ /// "A",
+ /// "B",
+ /// "C",
+ /// "D"};
+ ///
+ ///
+ /// ListBox lb = new ListBox();
+ /// // set up properties on the listbox here.
+ /// lb.Items.All = new String [] {
+ /// "A",
+ /// "B",
+ /// "C",
+ /// "D"};
+ ///
+ ///
+ /// // wrong
+ /// Form child = new ChildForm();
+ /// this.getMdiClient().add(child);
+ /// // right
+ /// Form child = new ChildForm();
+ /// child.setMdiParent(this);
+ ///
+ ///
+ /// MonthCalendar mc = new MonthCalendar();
+ /// // add specific dates to bold
+ /// DateTime[] time = new DateTime[3];
+ /// time[0] = DateTime.Now;
+ /// time[1] = time[0].addDays(2);
+ /// time[2] = time[1].addDays(2);
+ /// mc.setBoldedDates(time);
+ ///
+ /// Removal of all bolded dates is accomplished with:
+ ///
+ /// mc.removeAllBoldedDates();
+ ///
+ /// Although less efficient, the user may need to add or remove bolded dates one at
+ /// a time. To improve the performance of this, neither addBoldedDate nor
+ /// removeBoldedDate repaints the monthcalendar. The user must call updateBoldedDates
+ /// to force the repaint of the bolded dates, otherwise the monthCalendar will not
+ /// paint properly.
+ /// The following is an example of this:
+ ///
+ /// DateTime time1 = new DateTime("3/5/98");
+ /// DateTime time2 = new DateTime("4/19/98");
+ /// mc.addBoldedDate(time1);
+ /// mc.addBoldedDate(time2);
+ /// mc.removeBoldedDate(time1);
+ /// mc.updateBoldedDates();
+ ///
+ /// The same applies to addition and removal of annual and monthly bolded dates.
+ /// IGNORECASE, IGNOREKANATYPE,
+ /// IGNORENONSPACE, IGNORESYMBOLS,
+ /// IGNOREWIDTH, and STRINGSORT.
+ /// do
+ /// loop, the method recurses on the shorter side and loops on the longer
+ /// side. This bounds the recursive depth by log2(n) in the worst case.
+ /// Otherwise, worst case recursive depth would be n.
+ /// items parameter is not a string array, the
+ /// toString method of each of the elements is called to
+ /// produce the string representation. The objects are then sorted by their
+ /// string representations using the default locale.
+ /// items parameter is not a string array,
+ /// the toString method of each of the elements is called to
+ /// produce the string representation. The objects are then sorted by their
+ /// string representations using the default locale.
+ /// items parameter is not a string array, the
+ /// toString method of each of the elements is called to
+ /// produce the string representation. The objects are then sorted by their
+ /// string representations using the default locale and the given sorting
+ /// options.
+ /// items parameter is not a string array,
+ /// the toString method of each of the elements is called to
+ /// produce the string representation. The objects are then sorted by their
+ /// string representations using the default locale and the given sorting
+ /// options.
+ /// items parameter is not a string array, the
+ /// toString method of each of the elements is called to
+ /// produce the string representation. The objects are then sorted by their
+ /// string representations using the given locale and the given sorting
+ /// options.
+ /// items parameter is not a string array,
+ /// the toString method of each of the elements is called to
+ /// produce the string representation. The objects are then sorted by their
+ /// string representations using the given locale and the given sorting
+ /// options.
+ /// keys
+ /// array specify the sort keys for corresponding elements in the
+ /// items array. The range of elements given by the
+ /// index and count parameters is sorted in both
+ /// arrays according to the given locale and sorting options.
+ /// If the keys parameter is null, the sort keys
+ /// are instead computed by calling the toString method of each
+ /// element in the items array.
+ /// null keys always sort before a non-null keys.
+ /// The options parameter is a combination of zero or more of
+ /// the following flags: IGNORECASE, IGNOREKANATYPE,
+ /// IGNORENONSPACE, IGNORESYMBOLS,
+ /// IGNOREWIDTH, STRINGSORT, and
+ /// DESCENDING.
+ ///