Edit and Continue: Changes are not allowed when the debugger has…
27-Aug-0909 Leave a comment
- Check that running in Debug mode
IT and business subjects
27-Aug-0909 Leave a comment
04-Aug-0909 Leave a comment
Dim list As System.Collections.ObjectModel.ReadOnlyCollection(Of String)
If list.Count = 1 Then
21-Jul-0909 Leave a comment
ComboBox1.DataSource = System.Enum.GetValues(GetType(PeopleNames))
Dim nameid As PeopleNames = CType(ComboBox1.SelectedValue, PeopleNames)
Note there should be no need to set the DisplayMember. If it does not work check that you have nothing on the control > DataBindings > Text binding
The variable “nameid” contains a 0, or 1, or 2 etc. depending on the value of the enumerated item that is currently selected.
May also bind to VS enumerations. Good use would be to bind to
ListBoxChartType.DataSource = System.Enum.GetValues(GetType(System.Windows.Forms.DataVisualization.Charting.SeriesChartType))
13-Jul-0909 Leave a comment
Select Case True
Case sender Is TextBox1
Label1.Text = TextBox1.Text
Case sender Is TextBox2
Label1.Text = TextBox2.Text
End Select
However, this translates into IL (and decompiled using Reflector) as:
Dim flag1 As Boolean = True
If (flag1 = (sender Is Me.TextBox1)) Then
Me.Label1.Text = Me.TextBox1.Text
Else
If (flag1 = (sender Is Me.TextBox2)) Then
Me.Label1.Text = Me.TextBox2.Text
End If
End If
I don’t know if this helps.
06-Jul-0909 Leave a comment
They said it could not be done.
But here is the code to set a Local Report Parameter at runtime
”’ <summary>
”’ METHOD How to set Report Parameter
”’ </summary>
”’ <param name="MyReportViewer"></param>
”’ <param name="sParameterName"></param>
”’ <param name="sParameterText"></param>
”’ <remarks></remarks>
Private Sub SetLocalReportParameter(ByVal MyReportViewer As Microsoft.Reporting.WinForms.ReportViewer, ByVal sParameterName As String, ByVal sParameterText As String)
Try
Dim rp As New ReportParameter(sParameterName, sParameterText)
Dim rpP() As ReportParameter = {rp}
With MyReportViewer
.LocalReport.SetParameters(rpP)
.RefreshReport()
End With
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
25-Jun-0909 Leave a comment