473,414 Members | 1,686 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,414 software developers and data experts.

Receive Message in no windows

3
Hi to every body,

I am reading this forum since about two weeks, this forum has solved a lot of question that i had, thank to every body.

I have a question about messages (WM_PAINT, etc...) in a no window object.

I am programming in C#.

I have an application which is yet developed, i can´t change it. This application have a communication funtionality, you can send a private message with SendMessage and when the application process this petition it respond to your window.

You can say to the application with number of message and to what window it must respond through a share memory.

Now i am programing a application that must can manage several instances of this application.

I am programing one object which wrappe all the funtionality of the communication with one instance of the application. I have the problem that when i have several instances, each one respond to my application window, but i need that each one respond to a specific object. I don´t want to manage all the message in other piece of code, i want manage the respond in the object which control the comunication. I am saing that i can´t config that each instance of the application have one number of message to answer to my application and control the respond in the main window.

I was thinking and i want know how do two things:

1.- Create threads with a message queue, and says to the application that answer to this queue.

or

2.- Asociate the object that manage the application to a control and try that this application answer to this control.

Thank to all.

Best regards.

PD: sorry for my english.
Apr 3 '08 #1
4 1139
folen
3
hello, here i am again.

I just do that the object manager inherit from System.Windows.Form.Control, and now my class can recive windows messages.

The proble is resolve but... not all the question are answer. ¿How can i have a thread with a message queue?

Thanks to all
Apr 3 '08 #2
Plater
7,872 Expert 4TB
There is an object called Queue (I think it's System.Collections.Specialized.Queue ?)
On one thread you listen for messages and when a message is received you can push it onto the queue.
Your other thread can be pulling messages off the Queue and responding to them?
Apr 3 '08 #3
folen
3
There is an object called Queue (I think it's System.Collections.Specialized.Queue ?)
On one thread you listen for messages and when a message is received you can push it onto the queue.
Your other thread can be pulling messages off the Queue and responding to them?
The problem isn´t comunicate two threads with a queue, the problem is have a thread to receive windows messages (or events) or user defined message send with the call to windows API SendMessage.

System.Collections.Specialized.Queue doesn´t exists.
Apr 4 '08 #4
Plater
7,872 Expert 4TB
Ok, well you said you had already figured out that you could inherit from Control and get at windows messages.
So what is the problem? Make a thread and have it respond to them then.


(Oh and I guess the object is System.Collections.Queue)
Apr 4 '08 #5

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

Similar topics

0
by: wang xiaoyu | last post by:
Hello,everyone. my program runs well in windows,i use tkSimpleDialog to receive some input,but when i copy my program into Linux RH8.0,entrys in my tkSimpleDialog derived Dialog have a vital...
12
by: Sven Groot | last post by:
I have a Windows Service application that acts as if it's an SMTP server. Outlook connects to this service, which is always running on the localhost. This works fine most of the time. However,...
8
by: Jason | last post by:
Hi all I have a little FTP proggie. It works, on windows xp, but it doesnt work properly on windows 2000. The first problem i have, is when retrieving a list of files. int bytes =...
1
by: Dan Kelley | last post by:
I have 2 projects - 1 Winform project that sends Udp messages using the UdpClient class when a button is clicked, and a Console application that listens for these Udp messages. If I try to use...
1
by: Saso Zagoranski | last post by:
Hi! I have simple client/server game that uses sockets to transfer different messages. The server and the client are running on the same machine.
6
by: ransoma22 | last post by:
I developing an application that receive SMS from a connected GSM handphone, e.g Siemens M55, Nokia 6230,etc through the data cable. The application(VB.NET) will receive the SMS automatically,...
2
by: Hooyoo | last post by:
Hello, guys. In my application, I need to receive a windows message from another window, and the other window is a MFC application using SendMessage to send a custom windows message. So, in my...
2
by: iwasinnihon | last post by:
I am writing a simple program to receive over http using windows sockets. my program does fine receiving text files. But returns the incorrect data when receiving image files. (The size of the...
3
by: Joe Blauth | last post by:
Hi all, I am currently working on a small application that sends messages from a client to a server and receives messages in return. Basically the functionality is made with sockets which is...
0
by: =?Utf-8?B?UmFqbmk=?= | last post by:
Dear William Stacey, I have written a server code using the Windows Socket API's. Wherein I have created the socket and bound it to a particular IP address and port number. Later I have made the...
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: 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
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
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...
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,...
0
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...

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.