473,401 Members | 2,146 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,401 software developers and data experts.

using BeginInvoke from a different class

4
Hi,
I am using vs 2005 .net C++. I have a question on how exactly to use BeginInvoke and if it is appropriate to use in my case. This is what I would like to do: I have mutlithreaded program: one thread is form1.h which is the UI the other thread which resides in a different class taht does some image processing. What I would like to do is take the image and display it without blocking the image processing thread. To my understanding I need to to have the UI thread create the form to display the image because it has a message pump. What I would like to do is from the image processing thread is call begininvoke to a function in form1.h. I will pass the image data etc to this function and in this function I will write code to display the image in its own form.
My problem is how do I tell my other thread to launch a beginInvoke on my form1.h. In other words how do I pass the instance of my form1 to my image processsing thread? For some reason I cannnot create an instance of form1.h in my image processing class it just doesnt seem to recognize form1 has a class type(perhaps circular dependenices). Can I pass the form handle instead? If there is a better solution to my problem please let me know thanks.

Thanks
Apr 10 '07 #1
2 1643
RedSon
5,000 Expert 4TB
Did you read the MSDN documentation for this method?
Apr 10 '07 #2
jesh
4
Yes I have, like I said I am not sure how to tackle this issue maybe beginInvoke may not be what to use? Do have any recomendations?

Thanks
Apr 10 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

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...
12
by: VM | last post by:
Hi, In my Win app, I'm using delegates because the process that'll be running is time-consuming and it requires parameters. The only problem I'm having is that the lines following the BeginInvoke...
11
by: Doug Thews | last post by:
I've been working on some samples that use BeginInvoke/EndInvoke. In one example, I call BeginInvoke and pass it an AsyncCallback function pointer. I was messing around with ReaderWriterLocks and...
3
by: JL | last post by:
I have a VB.NET desktop program that reads/writes data to a server using a Java-based Web Service. This web service, in identical formats, is located on several servers with each server being a...
9
by: john doe | last post by:
I have a question about BeginInvoke method found on the Control class. To quote the docs: "Executes the specified delegate asynchronously with the specified arguments, on the thread that the...
11
by: Dean Shimic | last post by:
void DisplayLines(object state) { for (int i = 0; i < 500; ++i) { int iCopy = i; rtb.BeginInvoke((MethodInvoker)delegate { rtb.AppendText(iCopy + "\n"); }); }
1
by: robparr | last post by:
Hello, hopefully someone can help me. I am reading and learning steadily about threading and asynchronous programming, which to me sound like the same thing. At the moment I am not sure what the...
7
by: Ben Voigt [C++ MVP] | last post by:
As much as the CLR team assures us that it's ok to fire-and-forget Control.BeginInvoke, it seems it isn't. Maybe this is a bug. See for example: the comments in...
0
by: Roger Stoller | last post by:
Hello. I have developed a COM object using ATL. It seems to work fine when accessing it from VB.NET most of the time. However, I want to use a delegate in VB to asynchronously run a method in...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.