473,473 Members | 1,825 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Help on populating a treeView and delegate ???

Dear all,

I have an VB windows application that colect information form a remote
database and then populate the tree view with part of the reords.
As database data can be huge , I have used the Queeue threading process to
colect those information. Then when the callback function is called I
populate my treeview with teh return object.

As the treeview control is not on the same thread, I have to use the Invoke
method.

For that I have first declare a delagate as follow :

Delegate Sub ReelList(ByVal Remote As Object)
Dim CollectReels As ReelList = AddressOf CollectReelHist

Then definition of my function CollectReelHist as :

private sub CollectReelHist (Remote as object)
....blabla
end sub

Then from my call back function of my main form I use :

Dim sParam(0) As Object
sParam(0) = m_objRemoteHist
myTreeView.Invoke(Me.CollectReels, sParam)

The problem I have is that it works only once, as long as my application
keeps running. If I stop my application and restart it again after a while
the delegate function cannot be called anymore and my application gets status
"Not Responding"

I have found out that if I create a new delegate function and paste the same
code in it, then it works again for a while.

It sounds like the function pointer gets corrupted after a while.

Do you have any idea ?

When my application restart to I have to use the myDelegate.RemoveAll in
order to clean ?

Can a Control invoke different delegates?

thnaks for your help
regards
Serge
Jul 21 '05 #1
0 1229

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

Similar topics

2
by: serge calderara | last post by:
Dear all, I am populating a treeview control with an XML file. I need to skip duplicate node entry from XML file in treeview if exit For that I ma using the following line of code : If...
12
by: serge calderara | last post by:
Dear all, I have a function that I need to run in a thread due to the fact that it can takes long time to execute according to the amount of data to collect. This function is also populating a...
0
by: N-Mayne | last post by:
Hi i was wondering if anyone knew how to Populating a TreeView control with the contents of a class and varibles etc, like netbean does but in C#. Thanks Nick Posted Via Usenet.com Premium...
0
by: serge calderara | last post by:
Dear all, I have an VB windows application that colect information form a remote database and then populate the tree view with part of the reords. As database data can be huge , I have used the...
0
by: drop | last post by:
Hi, I'm currently working with the Treeview control in ASP .Net 2.0. The tree is filled dynamically based on data contained in a MySQL Database. Here is the exact behavior I want : 1 - User...
2
by: Steve Arndt | last post by:
I'm trying to populate a vb.net treeview using a SQLDataReader at Treeview1_BeforeExpand. Basically I have a Treeview with 5 parent nodes and 1 dummy child node per parent. The first parent node...
3
by: bg_ie | last post by:
Hi, Lets say I have a TreeView with nodes that represent objects of a number of different types. Is there a way of associating the Set method of each object with its node in the TreeView? That...
2
by: =?Utf-8?B?cm9kY2hhcg==?= | last post by:
hey all, i have an employees database table like the following: Employees ------------- EmployeeID,Name,ManagerID 1,john,null 2,sue,1 3,tom,2
0
by: hardieca | last post by:
Hi, I have created a treeview bound to a sitemap provider. I have put it into a user control (the control will be used for similar, but not always identical, functionality). The treeview...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.