Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 2005 > Visual Basic 2005 Basics
Password Reminder
Register
| FAQ | Members List | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #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.
Reply With Quote
  #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.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 06:09 PM.


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