Hi,

I am using embedded visual basic 3 and pocket pc 2002.

I am trying to get my application to communicate with another app, so
that it sends a message when it is opened and closed.

I found out about RegisterWindowMessage and GetMessage but am unsure
about how to use them.

Would someone be able to give me some advice on their usage,
preferably with some examples?

Thanks
Richard

Re: RegisterWindowMessage Help by joao

joao
Fri Feb 22 05:20:19 CST 2008

You must use RegisterWindowMessage on both applications to create a
system-wide unique windows message identifier. You do this by providing the
same string as the parameter to RegisterWindowMessage on both applications.
The receiver application processes this message on the main window message
loop, just like any regular windows message. The sender application must
find the receiver window using FindWindow and then using a simple
SendMessage call to the returned HWND.

João Paulo Figueira

<richgreen83@hotmail.com> wrote in message
news:f5ff54ee-496f-476a-bcf3-a1de804eec7a@z17g2000hsg.googlegroups.com...
> Hi,
>
> I am using embedded visual basic 3 and pocket pc 2002.
>
> I am trying to get my application to communicate with another app, so
> that it sends a message when it is opened and closed.
>
> I found out about RegisterWindowMessage and GetMessage but am unsure
> about how to use them.
>
> Would someone be able to give me some advice on their usage,
> preferably with some examples?
>
> Thanks
> Richard


Re: RegisterWindowMessage Help by ctacke/>

ctacke/>
Fri Feb 22 06:06:02 CST 2008

You're probably better off just trying to use a named system event
(CreateEvent).


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com


<richgreen83@hotmail.com> wrote in message
news:f5ff54ee-496f-476a-bcf3-a1de804eec7a@z17g2000hsg.googlegroups.com...
> Hi,
>
> I am using embedded visual basic 3 and pocket pc 2002.
>
> I am trying to get my application to communicate with another app, so
> that it sends a message when it is opened and closed.
>
> I found out about RegisterWindowMessage and GetMessage but am unsure
> about how to use them.
>
> Would someone be able to give me some advice on their usage,
> preferably with some examples?
>
> Thanks
> Richard



Re: RegisterWindowMessage Help by richgreen83

richgreen83
Tue Feb 26 08:54:38 CST 2008

Thanks,

I've managed to figure out and implement RegisterWindowMessage and
Postmessage, but I still can't figure out how to detect the sent
messages from the 2nd application.

Also, how do I find and set the window handles of each app using evb3
so I know where to send the messages?

Re: RegisterWindowMessage Help by ctacke/>

ctacke/>
Tue Feb 26 09:55:30 CST 2008

I've not looked at eVB in many years, and I've tried to forget everything I
once knew about the language. Why are you developing and/or improving
applications using it? It's like writing a desktop application in VB 4.

In answer to your specific question, to get handles you could call the
FindWindow API. I don't think you can enumerate in eVB - can't recall if
the plumbing is available for that.


--

Chris Tacke, eMVP
Join the Embedded Developer Community
http://community.opennetcf.com




<richgreen83@hotmail.com> wrote in message
news:c771c73a-b9e7-4b20-8a91-6494be2bfffa@e23g2000prf.googlegroups.com...
> Thanks,
>
> I've managed to figure out and implement RegisterWindowMessage and
> Postmessage, but I still can't figure out how to detect the sent
> messages from the 2nd application.
>
> Also, how do I find and set the window handles of each app using evb3
> so I know where to send the messages?