Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Visual Basic 2005 Basics If you are new to Visual Basic programming with version 2005, this is the place to start your questions. For questions about the book: Beginning Visual Basic 2005 by Thearon Willis and Bryan Newsome, ISBN: 0-7645-7401-9 please, use this forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Basic 2005 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old December 2nd, 2008, 06:34 PM
Friend of Wrox
Points: 1,075, Level: 12
Points: 1,075, Level: 12 Points: 1,075, Level: 12 Points: 1,075, Level: 12
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2005
Location: , , United Kingdom.
Posts: 244
Thanks: 3
Thanked 4 Times in 4 Posts
Default Event Handling

I have made a new control which is a tab (just the tab) for use within another new control which is a tab browser. The link there, tab for a tab browser. Anyways, these tabs are added to the browser during runtime, so a global event handler is needed to handle a tab click from any one of these tabs, each one has a property called index which is set when the tab is added. So i think my question is what is the code for the event handler?

------------------------------------------------
Apocolypse2005, I'm a programmer - of sorts.
__________________
Apocolypse2005, I'm a programmer - of sorts.
  #2 (permalink)  
Old March 10th, 2009, 07:14 AM
Friend of Wrox
Points: 1,075, Level: 12
Points: 1,075, Level: 12 Points: 1,075, Level: 12 Points: 1,075, Level: 12
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2005
Location: , , United Kingdom.
Posts: 244
Thanks: 3
Thanked 4 Times in 4 Posts
Default The Answer

The answer i got for this thread is to use
Code:
Dim newButton AsNew Button

Public Sub load_newButton()
newButton.Text =
"Click Me"
newButton.Name = "btnClickMe"
AddHandler newButton.Click, AddressOf buttonClick
End Sub Public Sub buttonClick(ByVal sender As Object, ByVal e As EventArgs) 'Code in here End Sub
__________________
Apocolypse2005, I'm a programmer - of sorts.


Similar Threads
Thread Thread Starter Forum Replies Last Post
Event Handling C# 2.0 AccessAasif@aol.com C# 2005 2 January 25th, 2008 11:37 AM
Event handling in c# bhavna VS.NET 2002/2003 1 March 7th, 2007 12:19 PM
Event handling in c# bhavna General .NET 1 March 7th, 2007 05:32 AM
Event Handling Bill Crawley ASP.NET 2.0 Basics 0 February 28th, 2007 07:32 AM
Help with Event handling nulogix Java GUI 1 October 11th, 2004 03:55 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.