473,748 Members | 11,134 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

call a control's invoke from other window form

91 New Member
Hi,

I have a problem to call a richText control's invoke from other window form while program background work. however if I implement the background work under the same window form as the control, it's no problem.

The debug error message shows, it need to get the window's handle before call it's invoke. Is there anyone has the experience of this problem and any sample codes for multi-thread implement.'
'
many thanks
qf
Nov 21 '06 #1
3 1720
albertw
267 Contributor
Hi,

I have a problem to call a richText control's invoke from other window form while program background work. however if I implement the background work under the same window form as the control, it's no problem.

The debug error message shows, it need to get the window's handle before call it's invoke. Is there anyone has the experience of this problem and any sample codes for multi-thread implement.'
'
many thanks
qf
hi

usually controls are part of a project, while objects are part of a form.
to address objects in another form, use the full path name. that includes the formname as well.
Nov 21 '06 #2
qfchen
91 New Member
Hi
Thanks for the quick reply. Yes, I did include the formname, otherwise it will fail compile. The code actually look like this: formABC.richTex t.invoke(...), any other idea?

Thanks.
qf
Nov 21 '06 #3
qfchen
91 New Member
By the way, do you know how to get a window handle, any sample codes?

Thanks.
qf
Nov 21 '06 #4

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

Similar topics

5
2692
by: Sue | last post by:
After finishing up my first quarter JavaScript on 12/12/03, I decided to improve character checking on my project. In my project I only had to do very basic validation. Therefore, I only had one function to verify the name fields, age, email and gender. My question is: if I create a function for each field like the code below, what would be the best way to organize the functions and call them? Would I need one main function and place...
9
7597
by: David Sworder | last post by:
Hi, I have a form that displays data (is that vague enough for you?). The data comes in on a thread-pool thread. Since the thread pool thread is not the same as the UI thread, the callback function of my form follows the standard design pattern: if(IsDisposed){ return; }
2
3007
by: rawCoder | last post by:
Hi I am having this InvalidOperationException with message Cannot call Invoke or InvokeAsync on a control until the window handle has been created This is raised when i try to invoke a method with arguments I need to do this as the method is being called Asynchronously from elsewhere using delegate's BeginInvoke method. The form is well created/initialized yet the messages states otherwise.
0
1473
by: Paul Tomlinson | last post by:
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...
0
1164
by: Carlitos | last post by:
Hi there, I apologize if it is not the right forum to post this question, but it has to do with C#, HTML and javascript altogether. I programmed a windows form custom control in C# which exposes several public methods. I coded a HTML page and placed (by code) my custom control. I also placed a button on the same page. Every time I click on the button, it calls one of
2
3068
by: Garry Freemyer | last post by:
Right now, I have my screensaver calling the IsWindowVisible api call from user32.dll and it seems that there ought to be a way to determine if the window is visible another way. I found that I could test for the EXISTANCE of a window by trying to create a graphics object from a handle to the preview window, but unlike the api call, this will report the window as still in existance even if the preview window is NOT visible to me,...
0
2961
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 thread. so far so good. all contacts r added properly. now when another login adds me in his contact, i recv a subscription, so i popup a form and ask for accept/reject. this all happens in a separate thread. popup form gets opened and choice is...
8
36136
by: hoofbeats95 | last post by:
I don't think this should be this complicated, but I can't figure it out. I've worked with C# for several years now, but in a web environment, not with windows form. I have a form with a query button on it. If the query returns multiple results, a new window is opened with a grid containing the results. When the user double clicks on the desired row in the grid, I want the first form to populate with the correct data. I don't know how...
1
1689
by: =?Utf-8?B?RGF2ZQ==?= | last post by:
I have a class that Form1 calls to do some work. I would like to report back progress from the class to a richtextbox, will call it m_report, on the form. Like in the class, Form1.m_report.Text= "Calculating variable 10"; How would I do that.
0
8828
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9367
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9319
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6795
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6073
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4599
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4869
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2780
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2213
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.