473,382 Members | 1,775 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Proxy Event Class

Hi,

What I am looking to do is call a function which will generate an object based on its passed parameters, add it to another control and when the generated item is clicked pass the event back to the calling class by using Addressof (if that makes any sense)

I came up with: -

Public Shared Function AddTaskItem(ByVal p_Label As String, ByVal p_Icon As Icon, ByRef callback As System.EventHandler) As Boolean

Dim pTaskItem As New mdobler.XPCommonControls.XPLinkedLabelIcon
Dim oItemTemp() As mdobler.XPCommonControls.XPLinkedLabelIcon
pTaskItem.Text = p_Label
pTaskItem.Icon = p_Icon
pTaskItem.Tag = callback

AddHandler pTaskItem.Click, callback

oTaskContainer.Controls.Add(pTaskItem)

End Function

I was calling this function (from a seperate class) by: -

Plugins.Extensions.AddTaskItem("Test", Nothing, AddressOf myclickhandlerfunction)

It runs with no errors however no event gets passed to myclickhandlerfunction it looks like it looses the event as soon as the AddTaskIten function completes.

Any help is greatly appreciated.

Cheers

Paul Trippett
Nov 20 '05 #1
0 998

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: nitrogenycs | last post by:
Hello, I need a way to get a notification whenever a variable of an object changes. The approach should be non-intrusive so that I can use existing objects without modifying them. I want to be...
5
by: Benne Smith | last post by:
Hi, I have three enviroments; a development, a testing and a production enviroment. I'm making a big application (.exe), which uses alot of different webservices. I don't use the webservices...
8
by: Joe | last post by:
I have a web service which returns many types (classes) to match the return type. I want to cast the return type to the actual class type. For example: namespace Test { class MyClass { ...
1
by: David Lojudice S. | last post by:
3
by: Codex Twin | last post by:
Hello apologies if this is the wrong newsgroup to be sending this to. Basically, I have an ASP.NET application that I am trying to force to use a proxy server settings. This can be done by...
5
by: HenrySeque | last post by:
I have a webservice and I add a web reference from my web project. I want the proxy class to implements an Interface, but I didn't find the source code of the proxy class and I don't want to...
0
by: Richard Gregory | last post by:
Hi, I have the wsdl below, for an Axis web service, and when I select Add Web Refernce in Visual Studio the proxy is missing a class representing the returnedElementsType (see reference.cs below...
7
by: Pro1712 | last post by:
Hello, I need to write a simple proxy server. What I want to do is to use HttpListener to get requests from the browser, add some proxy information and some other stuff and send the request to...
3
by: daniel | last post by:
Maybe I'm not understanding things. I have a multi-threaded callback producer (Unmanaged C++), which fires into a managed proxy class, which in turn calls into a managed C++ consumer (mixed mode...
2
by: Dinsdale | last post by:
We have created a object library that implements the INotifyPropertyChanged.PropertyChanged to bubble changes up to higher level classes. For instance, we have a person class that can have...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.