Multiple Tasks is one Click Event
IS there any method to perform two different tasks in one click event
Like
By clicking OK button i can do
1- Instantiate a new form
2- Add somthing to listview or 开发者_开发知识库can do something else
But these tasks not to me simultaneous. One task at a time
Please if any one can help then i shall be thankful to him\her
Thanks for quick response Actually these taks will be performed simultanously, but i want one task to be performed at a time, not both
In the button_Click event type in two methods?
void Button.._Click { Lstviewtest.Items.Add(--someting); Form m = new form(); m.Show(); }
is this what your looking for? If not what's your question exactly?
Thanks Now i solved this in this way
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
If Form1.TabControl3.SelectedTab.Text = "Scope" Then
If Me.TextBox3.Text <> "" Then
Form1.ListView4.Items.Add(TextBox3.Text)
End If
Else
If Form1.TabControl3.SelectedTab.Text = "Delegation" Then
Dim f4 As New Form4
f4.Show()
End If
End If
End Sub
精彩评论