By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,704 Members | 1,122 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,704 IT Pros & Developers. It's quick & easy.

Listening for messages in compact.net

P: n/a
Hi,
How do i listen for windows messages in c# on
compact.net? I have a window containing an instantiation
of the HTML viewer control, which is a child of the main
form. As the compact implementation of the form class
does not have a wndproc function to override, i cannot
get the messages. I cannot use a message window, as the
window i am listening to will then not display.

Is there another method of doing this?
Adam
Nov 15 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Hello Adam,

Currently I am looking for somebody who could help you on it and will
follow up with you here. Thanks.

Best regards,
Yanhong Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
!Content-Class: urn:content-classes:message
!From: "Adam" <ad**@twv.org>
!Sender: "Adam" <ad**@twv.org>
!Subject: Listening for messages in compact.net
!Date: Mon, 1 Sep 2003 09:52:18 -0700
!Lines: 11
!Message-ID: <00****************************@phx.gbl>
!MIME-Version: 1.0
!Content-Type: text/plain;
! charset="iso-8859-1"
!Content-Transfer-Encoding: 7bit
!X-Newsreader: Microsoft CDO for Windows 2000
!X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
!Thread-Index: AcNwqWdmFhiPnPfmSIG2yJty/GDZMg==
!Newsgroups: microsoft.public.dotnet.languages.csharp
!Path: cpmsftngxa06.phx.gbl
!Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:181352
!NNTP-Posting-Host: TK2MSFTNGXA12 10.40.1.164
!X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
!
!Hi,
!How do i listen for windows messages in c# on
!compact.net? I have a window containing an instantiation
!of the HTML viewer control, which is a child of the main
!form. As the compact implementation of the form class
!does not have a wndproc function to override, i cannot
!get the messages. I cannot use a message window, as the
!window i am listening to will then not display.
!
!Is there another method of doing this?
!Adam
!

Nov 15 '05 #2

P: n/a
Sorry, but I don't think this will work (as i have
already tried using a message window).
If i set the message window as the parent of the HTML
control, i can receive the messages, but the control
doesn't display. If i set my form as the parent, the
control displays but i can't receive the messages. I need
it to both display the control and receive the messages
from it at the same time.
Adam.
-----Original Message-----
Please check the documentation on "Windows Messages from Native Controls"at -
http://msdn.microsoft.com/library/default.asp? url=/library/en-us/dv_evtuv/html/etconwindowsmessagesfromnativecontrols.asp

The links for MessageWindow Class and Message Structure on the above pageshould provide more information and code samples.

The following articles with code samples should give a better understanding-
Using the MessageWindow Class-
http://samples.gotdotnet.com/quickst...pactFramework/ doc/messagewindow.aspx
Using the Microsoft .NET Compact Framework MessageWindow Class -http://msdn.microsoft.com/library/default.asp? url=/library/en-us/dnnetcomp/html/messagewindow.asp
Reggie
Microsoft DSW-MDD

This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| X-Tomcat-ID: 40358785
| References: <00****************************@phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain
| Content-Transfer-Encoding: 7bit
| From: yh*****@online.microsoft.com (Yan-Hong Huang [MSFT])| Organization: Microsoft
| Date: Wed, 03 Sep 2003 01:31:06 GMT
| Subject: RE: Listening for messages in compact.net
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
| Message-ID: <#Z**************@cpmsftngxa06.phx.gbl>
| Newsgroups: microsoft.public.dotnet.languages.csharp
| Lines: 40
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:181729| NNTP-Posting-Host: TOMCATIMPORT2 10.201.218.182
|
| Hello Adam,
|
| Currently I am looking for somebody who could help you on it and will| follow up with you here. Thanks.
|
| Best regards,
| Yanhong Huang
| Microsoft Online Partner Support
|
| Get Secure! - www.microsoft.com/security
| This posting is provided "AS IS" with no warranties, and confers norights.
|
| --------------------
| !Content-Class: urn:content-classes:message
| !From: "Adam" <ad**@twv.org>
| !Sender: "Adam" <ad**@twv.org>
| !Subject: Listening for messages in compact.net
| !Date: Mon, 1 Sep 2003 09:52:18 -0700
| !Lines: 11
| !Message-ID: <00****************************@phx.gbl>
| !MIME-Version: 1.0
| !Content-Type: text/plain;
| ! charset="iso-8859-1"
| !Content-Transfer-Encoding: 7bit
| !X-Newsreader: Microsoft CDO for Windows 2000
| !X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300| !Thread-Index: AcNwqWdmFhiPnPfmSIG2yJty/GDZMg==
| !Newsgroups: microsoft.public.dotnet.languages.csharp
| !Path: cpmsftngxa06.phx.gbl
| !Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.languages.csharp:181352
| !NNTP-Posting-Host: TK2MSFTNGXA12 10.40.1.164
| !X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
| !
| !Hi,
| !How do i listen for windows messages in c# on
| !compact.net? I have a window containing an instantiation| !of the HTML viewer control, which is a child of the main| !form. As the compact implementation of the form class
| !does not have a wndproc function to override, i cannot| !get the messages. I cannot use a message window, as the| !window i am listening to will then not display.
| !
| !Is there another method of doing this?
| !Adam
| !
|
|

.

Nov 15 '05 #3

P: n/a
Could you send a snippet of the part where you are using the HTMLView
control with the MessageWindow?

Reggie
Microsoft DSW-MDD

This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| Content-Class: urn:content-classes:message
| From: "Adam" <ad**@twv.org>
| Sender: "Adam" <ad**@twv.org>
| References: <00****************************@phx.gbl>
<#Z**************@cpmsftngxa06.phx.gbl>
<en**************@cpmsftngxa06.phx.gbl>
| Subject: RE: Listening for messages in compact.net
| Date: Thu, 4 Sep 2003 01:27:26 -0700
| Lines: 122
| Message-ID: <0c****************************@phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcNyvl9psqkKDb7nTLagYwpGWAyI+w==
| Newsgroups: microsoft.public.dotnet.languages.csharp
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:182188
| NNTP-Posting-Host: TK2MSFTNGXA09 10.40.1.161
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| Sorry, but I don't think this will work (as i have
| already tried using a message window).
| If i set the message window as the parent of the HTML
| control, i can receive the messages, but the control
| doesn't display. If i set my form as the parent, the
| control displays but i can't receive the messages. I need
| it to both display the control and receive the messages
| from it at the same time.
| Adam.
| >-----Original Message-----
| >Please check the documentation on "Windows Messages from
| Native Controls"
| >at -
| >http://msdn.microsoft.com/library/default.asp?
| url=/library/en-us/dv_evtuv/ht
| >ml/etconwindowsmessagesfromnativecontrols.asp
| >
| >The links for MessageWindow Class and Message Structure
| on the above page
| >should provide more information and code samples.
| >
| >The following articles with code samples should give a
| better understanding
| >-
| >Using the MessageWindow Class-
| >http://samples.gotdotnet.com/quickst...pactFramework/
| doc/messagewindow.a
| >spx
| >Using the Microsoft .NET Compact Framework MessageWindow
| Class -
| >http://msdn.microsoft.com/library/default.asp?
| url=/library/en-us/dnnetcomp/h
| >tml/messagewindow.asp
| >
| >
| >Reggie
| >Microsoft DSW-MDD
| >
| >This posting is provided "AS IS" with no warranties, and
| confers no rights.
| >
| >
| >
| >--------------------
| >| X-Tomcat-ID: 40358785
| >| References: <00****************************@phx.gbl>
| >| MIME-Version: 1.0
| >| Content-Type: text/plain
| >| Content-Transfer-Encoding: 7bit
| >| From: yh*****@online.microsoft.com (Yan-Hong Huang
| [MSFT])
| >| Organization: Microsoft
| >| Date: Wed, 03 Sep 2003 01:31:06 GMT
| >| Subject: RE: Listening for messages in compact.net
| >| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
| >| Message-ID: <#Z**************@cpmsftngxa06.phx.gbl>
| >| Newsgroups: microsoft.public.dotnet.languages.csharp
| >| Lines: 40
| >| Path: cpmsftngxa06.phx.gbl
| >| Xref: cpmsftngxa06.phx.gbl
| microsoft.public.dotnet.languages.csharp:181729
| >| NNTP-Posting-Host: TOMCATIMPORT2 10.201.218.182
| >|
| >| Hello Adam,
| >|
| >| Currently I am looking for somebody who could help you
| on it and will
| >| follow up with you here. Thanks.
| >|
| >| Best regards,
| >| Yanhong Huang
| >| Microsoft Online Partner Support
| >|
| >| Get Secure! - www.microsoft.com/security
| >| This posting is provided "AS IS" with no warranties,
| and confers no
| >rights.
| >|
| >| --------------------
| >| !Content-Class: urn:content-classes:message
| >| !From: "Adam" <ad**@twv.org>
| >| !Sender: "Adam" <ad**@twv.org>
| >| !Subject: Listening for messages in compact.net
| >| !Date: Mon, 1 Sep 2003 09:52:18 -0700
| >| !Lines: 11
| >| !Message-ID: <00****************************@phx.gbl>
| >| !MIME-Version: 1.0
| >| !Content-Type: text/plain;
| >| ! charset="iso-8859-1"
| >| !Content-Transfer-Encoding: 7bit
| >| !X-Newsreader: Microsoft CDO for Windows 2000
| >| !X-MimeOLE: Produced By Microsoft MimeOLE
| V5.50.4910.0300
| >| !Thread-Index: AcNwqWdmFhiPnPfmSIG2yJty/GDZMg==
| >| !Newsgroups: microsoft.public.dotnet.languages.csharp
| >| !Path: cpmsftngxa06.phx.gbl
| >| !Xref: cpmsftngxa06.phx.gbl
| >microsoft.public.dotnet.languages.csharp:181352
| >| !NNTP-Posting-Host: TK2MSFTNGXA12 10.40.1.164
| >| !X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
| >| !
| >| !Hi,
| >| !How do i listen for windows messages in c# on
| >| !compact.net? I have a window containing an
| instantiation
| >| !of the HTML viewer control, which is a child of the
| main
| >| !form. As the compact implementation of the form class
| >| !does not have a wndproc function to override, i
| cannot
| >| !get the messages. I cannot use a message window, as
| the
| >| !window i am listening to will then not display.
| >| !
| >| !Is there another method of doing this?
| >| !Adam
| >| !
| >|
| >|
| >
| >.
| >
|

Nov 15 '05 #4

P: n/a
Hi Adam,

I already posted this in the other newsgroup thread, but just for
completeness, I am posting it here too.

I looked at your sample at www.tenwisevirgins.com/Example.zip. I believe
you have already got the display part to work.

The HTMLViewer class in the sample is from
http://www.opennetcf.org/download.asp?product=Forms. The sample needs to be
combined with the concepts on "Using MessageWindow" at
http://msdn.microsoft.com/library/de...us/dv_evtuv/ht
ml/etconusingmessagewindow.asp

To be more specific, the HTMLViewer class needs a protected override
method that handles the event. From this method you need to do a
Microsoft.WindowsCE.Forms.MessageWindow.SendMessag e with an object of type
Microsoft.WindowsCE.Forms.Message created with myMessageWindow.NM_HOTSPOT
as the message id.

Let us know how this goes

Reggie
Microsoft - DSW-MDD

This posting is provided "AS IS" with no warranties and confers no rights.
--------------------
| X-Tomcat-ID: 385160070
| References: <00****************************@phx.gbl>
<#Z**************@cpmsftngxa06.phx.gbl>
<en**************@cpmsftngxa06.phx.gbl>
<0c****************************@phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain
| Content-Transfer-Encoding: 7bit
| From: ra******@online.microsoft.com ("Reggie Joy")
| Organization: Microsoft
| Date: Mon, 08 Sep 2003 15:17:24 GMT
| Subject: RE: Listening for messages in compact.net
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
| Message-ID: <nV**************@cpmsftngxa06.phx.gbl>
| Newsgroups: microsoft.public.dotnet.languages.csharp
| Lines: 131
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:183210
| NNTP-Posting-Host: TOMCATIMPORT2 10.201.218.182
|
| Could you send a snippet of the part where you are using the HTMLView
| control with the MessageWindow?
|
| Reggie
| Microsoft DSW-MDD
|
| This posting is provided "AS IS" with no warranties, and confers no
rights.
|
|
| --------------------
| | Content-Class: urn:content-classes:message
| | From: "Adam" <ad**@twv.org>
| | Sender: "Adam" <ad**@twv.org>
| | References: <00****************************@phx.gbl>
| <#Z**************@cpmsftngxa06.phx.gbl>
| <en**************@cpmsftngxa06.phx.gbl>
| | Subject: RE: Listening for messages in compact.net
| | Date: Thu, 4 Sep 2003 01:27:26 -0700
| | Lines: 122
| | Message-ID: <0c****************************@phx.gbl>
| | MIME-Version: 1.0
| | Content-Type: text/plain;
| | charset="iso-8859-1"
| | Content-Transfer-Encoding: 7bit
| | X-Newsreader: Microsoft CDO for Windows 2000
| | X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| | Thread-Index: AcNyvl9psqkKDb7nTLagYwpGWAyI+w==
| | Newsgroups: microsoft.public.dotnet.languages.csharp
| | Path: cpmsftngxa06.phx.gbl
| | Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.languages.csharp:182188
| | NNTP-Posting-Host: TK2MSFTNGXA09 10.40.1.161
| | X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
| |
| | Sorry, but I don't think this will work (as i have
| | already tried using a message window).
| | If i set the message window as the parent of the HTML
| | control, i can receive the messages, but the control
| | doesn't display. If i set my form as the parent, the
| | control displays but i can't receive the messages. I need
| | it to both display the control and receive the messages
| | from it at the same time.
| | Adam.
| | >-----Original Message-----
| | >Please check the documentation on "Windows Messages from
| | Native Controls"
| | >at -
| | >http://msdn.microsoft.com/library/default.asp?
| | url=/library/en-us/dv_evtuv/ht
| | >ml/etconwindowsmessagesfromnativecontrols.asp
| | >
| | >The links for MessageWindow Class and Message Structure
| | on the above page
| | >should provide more information and code samples.
| | >
| | >The following articles with code samples should give a
| | better understanding
| | >-
| | >Using the MessageWindow Class-
| | >http://samples.gotdotnet.com/quickst...pactFramework/
| | doc/messagewindow.a
| | >spx
| | >Using the Microsoft .NET Compact Framework MessageWindow
| | Class -
| | >http://msdn.microsoft.com/library/default.asp?
| | url=/library/en-us/dnnetcomp/h
| | >tml/messagewindow.asp
| | >
| | >
| | >Reggie
| | >Microsoft DSW-MDD
| | >
| | >This posting is provided "AS IS" with no warranties, and
| | confers no rights.
| | >
| | >
| | >
| | >--------------------
| | >| X-Tomcat-ID: 40358785
| | >| References: <00****************************@phx.gbl>
| | >| MIME-Version: 1.0
| | >| Content-Type: text/plain
| | >| Content-Transfer-Encoding: 7bit
| | >| From: yh*****@online.microsoft.com (Yan-Hong Huang
| | [MSFT])
| | >| Organization: Microsoft
| | >| Date: Wed, 03 Sep 2003 01:31:06 GMT
| | >| Subject: RE: Listening for messages in compact.net
| | >| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
| | >| Message-ID: <#Z**************@cpmsftngxa06.phx.gbl>
| | >| Newsgroups: microsoft.public.dotnet.languages.csharp
| | >| Lines: 40
| | >| Path: cpmsftngxa06.phx.gbl
| | >| Xref: cpmsftngxa06.phx.gbl
| | microsoft.public.dotnet.languages.csharp:181729
| | >| NNTP-Posting-Host: TOMCATIMPORT2 10.201.218.182
| | >|
| | >| Hello Adam,
| | >|
| | >| Currently I am looking for somebody who could help you
| | on it and will
| | >| follow up with you here. Thanks.
| | >|
| | >| Best regards,
| | >| Yanhong Huang
| | >| Microsoft Online Partner Support
| | >|
| | >| Get Secure! - www.microsoft.com/security
| | >| This posting is provided "AS IS" with no warranties,
| | and confers no
| | >rights.
| | >|
| | >| --------------------
| | >| !Content-Class: urn:content-classes:message
| | >| !From: "Adam" <ad**@twv.org>
| | >| !Sender: "Adam" <ad**@twv.org>
| | >| !Subject: Listening for messages in compact.net
| | >| !Date: Mon, 1 Sep 2003 09:52:18 -0700
| | >| !Lines: 11
| | >| !Message-ID: <00****************************@phx.gbl>
| | >| !MIME-Version: 1.0
| | >| !Content-Type: text/plain;
| | >| ! charset="iso-8859-1"
| | >| !Content-Transfer-Encoding: 7bit
| | >| !X-Newsreader: Microsoft CDO for Windows 2000
| | >| !X-MimeOLE: Produced By Microsoft MimeOLE
| | V5.50.4910.0300
| | >| !Thread-Index: AcNwqWdmFhiPnPfmSIG2yJty/GDZMg==
| | >| !Newsgroups: microsoft.public.dotnet.languages.csharp
| | >| !Path: cpmsftngxa06.phx.gbl
| | >| !Xref: cpmsftngxa06.phx.gbl
| | >microsoft.public.dotnet.languages.csharp:181352
| | >| !NNTP-Posting-Host: TK2MSFTNGXA12 10.40.1.164
| | >| !X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
| | >| !
| | >| !Hi,
| | >| !How do i listen for windows messages in c# on
| | >| !compact.net? I have a window containing an
| | instantiation
| | >| !of the HTML viewer control, which is a child of the
| | main
| | >| !form. As the compact implementation of the form class
| | >| !does not have a wndproc function to override, i
| | cannot
| | >| !get the messages. I cannot use a message window, as
| | the
| | >| !window i am listening to will then not display.
| | >| !
| | >| !Is there another method of doing this?
| | >| !Adam
| | >| !
| | >|
| | >|
| | >
| | >.
| | >
| |
|
|

Nov 15 '05 #5

P: n/a
>-----Original Message-----
<snip>
To be more specific, the HTMLViewer class needs a
protected override method that handles the event.
</snip>

Thanks for your reply, but...
The HTMLViewer class cannot handle the event and then
send it to a message window because the only things that
handle events in the compact framework are message
windows. I keep posting this, and microsoft employees
keep ignoring it. This aside, I have now solved the
problem with the help of the following article, which
others with the same problem may find useful:

http://www.gotdotnet.com/Community/U...es/Details.asp
x?SampleGuid=3C1A8B60-5E76-477A-A79F-D248DB9600E8

Nov 15 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.