Search - Articles
DevASP.NET for ASP.NET, VB.NET, XML and C# (C-Sharp) Developers Tuesday, March 03, 2009
Dev Articles
Search Directory
ASP.NET
VB.Net
C-Sharp
SQL Server
 


Home >Search > Articles & Samples > Visual Basic.Net > Event Handling


Search:
What's New - What's Hot
How to: Add an Event Handler Using Code     
Total Hits: 73  |  Today: 0Author: Microsoft Corporation      Rating:  
Read Reviews | Write Review |  Your Rating: 

This example shows how to add an event handler to an element by using code. If you want to add an event handler to a XAML element, and the markup page that contains the element has already been loaded, you must add the handler using code. Alternatively, if you are building up the element tree for an application entirely using code and not declaring any elements using XAML, you can call specific methods to add event handlers to the constructed element tree....

.NET Event Handling using the Template Method Design Pattern     
Total Hits: 256  |  Today: 0Author: Kevin McFarlane.      Rating:  
Read Reviews | Write Review |  Your Rating: 

Microsoft .NET event handling, in common with typical object-oriented frameworks, is implemented using the well-known Observer design pattern. (See the book, Design Patterns, by Gamma et al., Addison-Wesley, 1995, pp325-330). This article describes how to enhance .NET event handling with the Template Method design pattern. The discussion and code snippets are in C# but the summary sample is implemented in both C# and Visual Basic .NET....

Multiple Forms in VB.NET. Part 3 - Using Events in Multiple Forms     
Total Hits: 164  |  Today: 0Author: Ged Mead      Rating:  
Read Reviews | Write Review |  Your Rating: 

As with the previous articles in this series, this one is also aimed at .NET Newbies and Upgraders. It tries to explain concepts as simply as possible, with the greatest use of plain English and minimum use of technical terms. The aim is to get the core ideas across as quickly as possible, so you can achieve the results you desire now; the technical details can follow in time. I know that many will not agree with this approach, but as a relative .NET Newbie myself, I know just how frustrating it...

Connecting Multiple Events to a Single Event Handler in Windows Forms  Version: 0.00     Price: $0.00  
Total Hits: 34  |  Today: 0Author: Microsoft Corporation      Rating:  
Read Reviews | Write Review |  Your Rating: 

In your application design, you may find it necessary to have a single event handler used for multiple events or the multiple events fire the same procedure. For example, it is often a powerful time-saver to have a menu command fire the same event as a button on your form does if they expose the same functionality. You can do this by using the Events view of the Properties window in C# or using the Handles keyword and the Class Name and Method Name drop-down boxes in the Visual Basic Code Editor...

EventHandlingScopeActivity Class  Version: 0.00     Price: $0.00  
Total Hits: 36  |  Today: 0Author: Microsoft Corporation      Rating:  
Read Reviews | Write Review |  Your Rating: 

Enables event handling with the execution of the child activities. This class cannot be inherited....

Handling DataSet Events (ADO.NET)  Version: 0.00     Price: $0.00  
Total Hits: 27  |  Today: 0Author: Microsoft Corporation      Rating:  
Read Reviews | Write Review |  Your Rating: 

The most commonly used event of the DataSet object is MergeFailed, which is raised when the schema of the DataSet objects being merged are in conflict. This occurs when a target and source DataRow have the same primary key value, and the EnforceConstraints property is set to true. For example, if the primary key columns of a table being merged are the same between the tables in the two DataSet objects, an exception is thrown and the MergeFailed event is raised. The MergeFailedEventArgs object pa...

How to: Invoke a Delegate Method  Version: 0.00     Price: $0.00  
Total Hits: 18  |  Today: 0Author: Microsoft Corporation      Rating:  
Read Reviews | Write Review |  Your Rating: 

This example shows how to associate a method with a delegate and then invoke that method through the delegate....

WithEvents and the Handles Clause  Version: 0.00     Price: $0.00  
Total Hits: 22  |  Today: 0Author: Microsoft Corporation      Rating:  
Read Reviews | Write Review |  Your Rating: 

The WithEvents statement and the Handles clause provide a declarative way of specifying event handlers. An event raised by an object declared with the WithEvents keyword can be handled by any procedure with a Handles statement for that event, as shown in the following example:...

AddHandler and RemoveHandler  Version: 0.00     Price: $0.00  
Total Hits: 13  |  Today: 0Author: Microsoft Corporation      Rating:  
Read Reviews | Write Review |  Your Rating: 

The AddHandler statement is similar to the Handles clause in that both allow you to specify an event handler. However, AddHandler, used with RemoveHandler, provides greater flexibility than the Handles clause, allowing you to dynamically add, remove, and change the event handler associated with an event. If you want to handle shared events or events from a structure, you must use AddHandler....

How to: Add Events to a Class  Version: 0.00     Price: $0.00  
Total Hits: 13  |  Today: 0Author: Microsoft Corporation      Rating:  
Read Reviews | Write Review |  Your Rating: 

Adding an event to a class specifies that an object of this class can raise a specific event. To cause an event to actually happen, you must use the RaiseEvent statement. You can use the Handles keyword or the AddHandler statement to associate the event with an event-handler procedure. Events must be raised within the scope where they are declared. For example, a derived class cannot raise events inherited from a base class....

How to: Raise an Event (Visual Basic)  Version: 0.00     Price: $0.00  
Total Hits: 16  |  Today: 0Author: Microsoft Corporation      Rating:  
Read Reviews | Write Review |  Your Rating: 

This example defines an event (TimeExpired) and uses the RaiseEvent statement to cause the event to occur....

How to: Create an Event and Handler (Visual Basic)  Version: 0.00     Price: $0.00  
Total Hits: 17  |  Today: 0Author: Microsoft Corporation      Rating:  
Read Reviews | Write Review |  Your Rating: 

This example defines an event, TimeExpired, and an event handler, HandleTimeExpired, and uses the AddHandler statement to associate them....

Walkthrough: Handling Events  Version: 0.00     Price: $0.00  
Total Hits: 15  |  Today: 0Author: Microsoft Corporation      Rating:  
Read Reviews | Write Review |  Your Rating: 

This is the second of two topics that demonstrate how to work with events. The first topic, Walkthrough: Declaring and Raising Events, shows how to declare and raise events. This section uses the form and class from that walkthrough to show how to handle events when they take place....

Troubleshooting Inherited Event Handlers in Visual Basic  Version: 0.00     Price: $0.00  
Total Hits: 8  |  Today: 0Author: Microsoft Corporation      Rating:  
Read Reviews | Write Review |  Your Rating: 

An inherited event handler must not include a Handles clause. The method in the base class is already associated with the event and will fire accordingly. Remove the Handles clause from the inherited method....

Events and Event Handlers  Version: 0.00     Price: $0.00  
Total Hits: 11  |  Today: 0Author: Microsoft Corporation      Rating:  
Read Reviews | Write Review |  Your Rating: 

While you might visualize a Visual Studio project as a series of procedures that execute in a sequence, in reality, most programs are event driven—meaning the flow of execution is determined by external occurrences called events....

How to: Connect Multiple Events to a Single Event Handler in Windows Forms  Version: 0.00     Price: $0.00  
Total Hits: 21  |  Today: 0Author: Microsoft Corporation      Rating:  
Read Reviews | Write Review |  Your Rating: 

In your application design, you may find it necessary to use a single event handler for multiple events or have multiple events perform the same procedure. For example, it is often a powerful time-saver to have a menu command raise the same event as a button on your form does if they expose the same functionality. You can do this by using the Events view of the Properties window in C# or using the Handles keyword and the Class Name and Method Name drop-down boxes in the Visual Basic Code Editor....

Handling .NET forms and their events in VB6 main application  Version: 0.00     Price: $0.00  
Total Hits: 34  |  Today: 0Author: Emad Al-Ashi      Rating:  
Read Reviews | Write Review |  Your Rating: 

Throughout my humble experience with COM and .NET interoperability (let's narrow it to VB6, and further to COM client and .NET objects!), I have only found too few resources on how to handle forms between the two technologies?rather than methods and properties. Issues like accessing the database through different forms?causing .NET forms to be closed upon closing the main form in VB6 (.NET forms won't close upon closing the main form in VB6 in the ordinary state!)? and handling the events raised...

Context Menu and Event Handling in Visual Basic .NET  Version: 0.00     Price: $0.00  
Total Hits: 54  |  Today: 0Author: benoyraj      Rating:  
Read Reviews | Write Review |  Your Rating: 

This article targets those who have not yet worked with ContextMenu in .NET environment and would like to understand a little easy way of how ContextMenu and its associated event handler works. How can a context menu for a notify icon be programmatically generated when the user right clicks on the notify icon? As a prerequisite, you should have a little bit idea of object oriented programming....

Static Event Binding Using WithEvents     
Total Hits: 478  |  Today: 0Author: Ted Pattison      Rating:  
Read Reviews | Write Review |  Your Rating: 

This month's Basic Instincts column builds upon my last three columns in which I introduced and explained the fundamental concepts and syntax associated with delegates and events. Last month I showed you how to design and write a simple class that defines and raises events. You also saw how to dynamically bind an event handler to an event using the AddHandler keyword. This month I am going to discuss static event binding, an alternative technique for registering an event handler....

Programming with Events Using .NET     
Total Hits: 298  |  Today: 0Author: Ted Pattison      Rating:  
Read Reviews | Write Review |  Your Rating: 

This month's Basic Instincts column builds upon my last two columns in which I talked about concepts and programming techniques associated with delegates. I will assume you have read the last two installments of this column and that you understand the role that delegates play within the Microsoft® .NET Framework. If you haven't read the last two columns, see Implementing Callback Notifications Using Delegates and Implementing Callbacks with a Multicast Delegate. You should also know how to desig...


1  2  3  Next >> 


Disclaimer - Privacy
© 2002-2017 DevASP.net