dcsimg
June 25, 2018
Hot Topics:

Communicating over a Network

  • November 19, 2002
  • By Sam Huggill
  • Send Email »
  • More Articles »

The best way to handle errors is to use events.

In Visual Basic, you can create your own events. An example event might be when you click on a button:

Private Sub Command1_Click()

You call or 'raise' events using the RaiseEvent method. This method accepts one parameter, which is one of the events declared. You declare an event like this:

Public Event TextSent(TextContent As String)

The event procedure for this event will look like this:

Private Sub MyModule_TextSent(TextContent As String)




Page 6 of 7



Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 


Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

By submitting your information, you agree that developer.com may send you developer offers via email, phone and text message, as well as email offers about other products and services that developer believes may be of interest to you. developer will process your information in accordance with the Quinstreet Privacy Policy.

Sitemap

×
We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.
Thanks for your registration, follow us on our social networks to keep up-to-date