473,382 Members | 1,407 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.

Problem calling Invoke to call a delegate on a child thread

Morning all. Let me describe my problem.

Main thread creates child objects and threads and starts them
Timer on the main thread (which only gets activated after the child threads
have started) periodically calls a function Refresh().
This refresh function runs on its own thread and queries our database for
new jobs.
For each job found this timer invokes a delegate on one of the child thread
objects.
I then get the error "Cannot call Invoke or InvokeAsync on a control until
the window handle has been created" on the line invoking the delegate

I can breakpoint the "invoke" call and inspect the object being called and
all looks good so i'm kinda at a loss
FYI this is my invoke call
this.Invoke( myParent.Queuer[i].ReceiveJobs, new object[] {
JobStore[index] } );

I have a breakpoint in the first line of the method set to receive
notification when this delegate is fired but it never gets control.

Can anyone suggest something, *anything* I should be looking at?

Thanks
PT
Nov 16 '05 #1
0 1449

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

Similar topics

6
by: thowle | last post by:
Okay, I'm sure there is a very simple solution to my problems here and I am just too tired, but then again maybe not. Here is an example of my code: Dim Conn_Thrd as new...
3
by: jayderk | last post by:
Hello All, I am running in to a situation where the listbox is not refreshing for me. I am using a timer to cycle every second and call the timer_elapsed() event. in the time_elapsed event...
0
by: Pawan Narula via DotNetMonster.com | last post by:
hi all, i'm using VB.NET and trying to code for contact management in a tree. all my contacts r saved in a text file and my C dll reads them one by one and sends to VB callback in a sync mode...
9
by: Terry Olsen | last post by:
I'm running an asynchronous Socket. In the ReceiveCallback method, I need to append what is received to a textbox on the main form. I have this code: Private Sub ToChatWindow(ByVal msg As...
3
by: kplkumar | last post by:
I want to call a method passing a parameter. I want to do this call on a seperate thread. For example, public class Foo { public static void FooSend(Message message) { // Start a seperate...
14
by: Christian Kaiser | last post by:
We have a component that has no window. Well, no window in managed code - it uses a DLL which itself uses a window, and this is our problem! When the garbage collector runs and removes our...
1
by: SAL | last post by:
Hello, I'm developing this remoting app (.net 2.0) and I need to bring the server app's form to the front often. Since you can not do cross-thread communication on a form or control without using...
4
by: billsahiker | last post by:
Why is my application crashing on a windows 98 machine? It runs fine on the development machine with xp pro. I installed framework 2, with dotnetfx.exe, and windows installer 2 on the windows 98...
4
by: =?iso-8859-1?B?S2VyZW0gR/xtcvxrY/w=?= | last post by:
Hi, i have a main thread an another worker thread. The main Thread creates another thread and waits for the threads signal to continue the main thread. Everything works inside a ModalDialog and...
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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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.