|
-
Apr 23rd, 2006, 11:41 PM
#18
Re: [1.0/1.1] Reference Errors? Help Me, Gimme Code :lol:
 Originally Posted by RobDog888
Why cant they just have the events avalable like in VB.NET?
I know that this was at least partly rhetorical but I'll give an explanation anyway. The drop-down lists in the VB code window are for all member variables declared WithEvents. You can declare a variable manually in code as WithEvents and it will appear in that list. It has no specific connection with the designer, except that every object added in the designer is declared WithEvents automatically. There is no WithEvents or Handles equivalents in C# so that doesn't apply. You are provided a method for creating event handlers for objects added in the designer as a time saver. Like I said, both mechanisms are available in VB 2005 and I find them both useful. One of the good things about the Properties window is that you can add a single event handler for multiple objects just as you can set the same property for multiple objects: just select them all in the designer and double-click the name of the event. This creates one method with all the objects listed in the Handles clause. You can also then use it to select existing methods for other events with compatible signatures.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|