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

Did you fing a solution

lb1
Hi Michael,

We have tha same problem with our application.

Did you already find a solution for you problem with the processcmdkey
and the appdomain?

Leon

Jul 21 '05 #1
2 1432
Yes, we actually did figure out a work around. What we did is we
created an implementation of IMessageFilter then added a new
MessageFilter instance to each of the newly created AppDomains as well
as the initial AppDomain. Our implementation of IMessageFilter adds a
parent reference which is also an instance of IMessageFilter. In our
shortcut key case (CTRL+SHIFT+....) the MessageFilter passes the message
to the parent MessageFilter if the parent is not null. You will also
need to add a serializable method in MessageFilter to pass the call
across AppDomains and make sure to do an Invoke on this serializable
method to make sure it runs on the correct Thread. A side effect of our
implementation is it is possible for the parent and the child AppDomains
to both process the same message so one user interaction causes two
actions. This could be handled by adding an interface to each of your
objects being run in separate AppDomains which contains a method such as
the following:

public bool IsMessageHandler(int keys);

which is implemented on each AppDomains primary class to designate
whether that class handles the passed keys. Then you just need to check
the current app domain and the parent appdomain (if it exists) using
this method to determine if the keys need to be processed.

Hope that helps. Let me know if any of this is confusing or needs
clarification.

Mike
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 21 '05 #2
Thanks at this time I also have an outstanding call to MS in
microsoft.public.dotnet.framework.windowsforms.con trols .
Hopefully I also get an answer from them, if not I will try your solution.

Thanks for your help.

"Michael W" wrote:
Yes, we actually did figure out a work around. What we did is we
created an implementation of IMessageFilter then added a new
MessageFilter instance to each of the newly created AppDomains as well
as the initial AppDomain. Our implementation of IMessageFilter adds a
parent reference which is also an instance of IMessageFilter. In our
shortcut key case (CTRL+SHIFT+....) the MessageFilter passes the message
to the parent MessageFilter if the parent is not null. You will also
need to add a serializable method in MessageFilter to pass the call
across AppDomains and make sure to do an Invoke on this serializable
method to make sure it runs on the correct Thread. A side effect of our
implementation is it is possible for the parent and the child AppDomains
to both process the same message so one user interaction causes two
actions. This could be handled by adding an interface to each of your
objects being run in separate AppDomains which contains a method such as
the following:

public bool IsMessageHandler(int keys);

which is implemented on each AppDomains primary class to designate
whether that class handles the passed keys. Then you just need to check
the current app domain and the parent appdomain (if it exists) using
this method to determine if the keys need to be processed.

Hope that helps. Let me know if any of this is confusing or needs
clarification.

Mike
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 21 '05 #3

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

Similar topics

0
by: SOAP | last post by:
where are I fing JSTL documents and API? I am new to use JSTL in JSP Thank you.. -- ~ Samba, more than a low cost File and Printer server ~ -- Let us OpenSource --
3
by: Wayne Wengert | last post by:
I have a solution. I want to clone it to try some different options. Is there a way to open Solution A, save it as Solution B and then be able to try some things in Solution B without affecting...
10
by: Simon Jefferies | last post by:
Hello, I'm getting a strange problem where when I load up my solution that has three projects:- a managed C++ .NET, one C++ lib, and a VB library. It locks up and doesn't load completely, I...
0
by: TEK | last post by:
Hello We have a quite huge project. To limit the solution size, rebuild time and so on we have divided the project in two different solution. One solution that holds the buiness entities, or...
6
by: I_AM_DON_AND_YOU? | last post by:
I have a small VB.Net Solution. The solution has filename LABELMAKER.SLN and the the project has filename LABELMAKER.VBPROJ. There is another file LABELMAKER.VBPROJ.USER. All these are in a...
2
by: lb1 | last post by:
Hi Michael, We have tha same problem with our application. Did you already find a solution for you problem with the processcmdkey and the appdomain? Leon
3
by: Manikandan | last post by:
Hi, I'm copying projects from a solution in the vss. In my local system i created solution ,added that project(make modification related to solution) When i added this solution to vss, projects...
0
by: techie | last post by:
List of Solution manuals: Engineering Circuit Analysis 6Ed - Hayt Solutions Manual Norbury - Solutions manual for mechanics and thermodynamics Physics For Scientists And Engineers - Solution...
16
by: =?Utf-8?B?RHdlZWJlcmVsbGE=?= | last post by:
I created an Access 2007 application for my customer. The application is shared by three employees on a server. It maintains a contact list including financial data and social security numbers. ...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
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,...

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.