January 2003
Beginner
696 pages
16h 38m
English
| Q1: | I want to be able to use control arrays to handle multiple events. Where did that functionality go? |
| A1: | Control arrays do not exist in Visual Basic .NET. Each control you add has its own event that you can write code for. You can, however, handle multiple events with a single method. You did this earlier with the genericClick event in the forms exercises. You can also use the Handles keyword to indicate what events a method should consume, as the following code demonstrates:
Private Sub Button5_Click(ByVal sender As System.Object, _ ByVal e As System.EventArgs) _ Handles Button5.Click, Button3.Click, Button4.Click, Button2.Click End Sub |
| Q2: | Can I use ActiveX controls from Visual Basic 6 in my .NET Windows Forms applications? |
| A2: | Yes, you ... |
Read now
Unlock full access