Re: Interapplication communication help
- From: "Dave O." <nobody@xxxxxxxxxxx>
- Date: Fri, 25 Jan 2008 16:47:49 -0000
First dump all that .NET crap, you don't need it
Next read up on MUTEX, this will let you identify processes.
You will need to be clever here because the MUTEX is just that "MUTually
EXclusive", but you could easily modify the MUTEX string to incorporate the
app name by appending it to a distinct string to identify your app, then all
you have to do is enumerate each property on each enumerated window and
compare the common part, then the app part, if the first bits match but not
the second you have the same app with different names. If both parts match
you have the same app with the same name so you need to unload the new copy.
Reading or writing to textboxes remotely is very simple, just use
SendMessage with the correct parameters (which I cannot recall all off the
top of my head). You will need the handle of the text box (which is why you
cannot use a label for this). You could put the handle in a property, or you
could put some known text into the text box, search for that on an
enumeration, then remotely change the content, perhaps with the handle of a
text box in the other app, then in the text box Change event you can deal
with whatever you need to do.
Dave O.
"pslitty" <jasonplasencia@xxxxxxxxx> wrote in message
news:c98a283b-8a9f-4d21-af5c-663aa55af79e@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I have a vb app that uses a .net wrapper that exposes the Process
object. I use this object to loop through all of the system running
processes and look for other instances of the same application. If I
find one, i want to be able to read either a (label or text box from a
form or module within that app) from that process or the processes
main window text. I have tried using some different API calls and the
MainWindowHandle but the MainWindowHandle does not seem to point me to
anything usefull with that process. Any ideas of what i might be
doing wrong or another way of doing what i am trying to do.
Basically, on start up of my application i want to be able to
determine if there are any other instances of me running, if so, check
the name because i allow seperate instances to run as long as the name
is different.
.
- Follow-Ups:
- Re: Interapplication communication help
- From: pslitty
- Re: Interapplication communication help
- From: Ralph
- Re: Interapplication communication help
- References:
- Interapplication communication help
- From: pslitty
- Interapplication communication help
- Prev by Date: Re: OT - paging Mike Williams
- Next by Date: Re: Interapplication communication help
- Previous by thread: Interapplication communication help
- Next by thread: Re: Interapplication communication help
- Index(es):
Relevant Pages
|