PC Review


Reply
Thread Tools Rate Thread

Asociate dinamically an event in VB.NET

 
 
Juan
Guest
Posts: n/a
 
      10th Feb 2005
Hello:

I'm creating some radiobuttons and i want to asociate their events
dinamically with a function. How can I do it?

In c# there is no trouble, because it can handle with it:

radiobutton1.click += new System.eventhandler(this.myfunction);

but when i use VB.NET I need to do in this way:

public sub myfunction() handles radiobutton1.click

Thanks

Juan


 
Reply With Quote
 
 
 
 
Chris, Master of All Things Insignificant
Guest
Posts: n/a
 
      10th Feb 2005
Use: AddHandler RadioButton1.Click, Addressof myfunction

Hope this helps
Chris

"Juan" <(E-Mail Removed)> wrote in message
news:OWkXP%(E-Mail Removed)...
> Hello:
>
> I'm creating some radiobuttons and i want to asociate their events
> dinamically with a function. How can I do it?
>
> In c# there is no trouble, because it can handle with it:
>
> radiobutton1.click += new System.eventhandler(this.myfunction);
>
> but when i use VB.NET I need to do in this way:
>
> public sub myfunction() handles radiobutton1.click
>
> Thanks
>
> Juan
>
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create and Open Word Document From Access & asociate with 2 Fields JuanJo Microsoft Access Form Coding 3 31st Aug 2009 05:22 PM
How asociate one text to one table and one title at the same time =?Utf-8?B?YXNvY2lhdGUgdGl0bGUtdGFibGUtZGVzY3JpYmVU Microsoft Word Document Management 1 3rd Apr 2007 07:08 AM
Asociate dinamically an event in VB.net Juan Microsoft Dot NET Compact Framework 1 10th Feb 2005 04:47 PM
define a name dinamically =?Utf-8?B?U2hhcnJv?= Microsoft Excel Worksheet Functions 1 29th Sep 2004 01:41 PM
Why i cannot bind the event handler of the control that i dinamically added ? Umut Tezduyar Microsoft ASP .NET 2 10th Nov 2003 07:33 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:14 AM.