Help rebuilding/redeploying OpenNetCF SDF

G

Guest

Hi,

I've posted this on the OpenNetCF forum, but since this place is usually more active and there are a lot of SDF users here, I figured this could be of benefit to others here as well...

A couple of questions (I did some searches but didn't run into anything that seemed to address this:)

I've been fiddling around with the SDF for a few days (first with 1.1, now with 1.2.) I've added a "JumpToAnchor" method to the HTML viewer (I need it in my app) and now I'm having a little problem deploying the modified SDF. I recompiled (lots of warnings in there, by the way [;)]) and then went to recreate the CAB file (Build Cab). However, the resulting CAB is much smaller than the one copied by the SDF installer to the VS.Net directory structure - in fact it looks like multiple CAB files are being created, while the SDF installer has everything in one CAB file?

I copied the new OpenNetCF.Windows.Forms.dll file to the VS.Net location, but since it is redeploying the CAB file, the changes are not reflected and the application crashes with a TypeLoadException. I found that copying the dll to the application's directory on the PDA solves that.. However I'm looking for a more robust solution. So essentially I'd like to know how to rebuild the CAB file correctly so I can copy it as-is to the VS.Net directory so it gets redeployed correctly.

I'd also like to know where the DLLs end up. After copying the DLL myself, I can see it using the Windows Explorer, but before that I could not see it (nor can I see any of the other DLLs.)
 
N

Neil Cowburn

Michel,

You want us to give away ALL our secrets? :)

I will follow-up with you after the weekend.

--Neil

Neil Cowburn (the one responsible for the packaging of the SDF)
Co-Founder
OpenNETCF.org

Principle Partner
OpenNETCF Consulting, LLC
 
G

Guest

*LOL*

Let's just say if I don't get this to work, I won't be allowed to use the SDF. :)

Incidentally after posting this I realized my "JumpToAnchor" function didn't work, even though I had done something similar to another HTML viewer custom control a while back. Monday's here, gotta get back to where I was on Friday: Hell. LOL

Neil Cowburn said:
Michel,

You want us to give away ALL our secrets? :)

I will follow-up with you after the weekend.

--Neil

Neil Cowburn (the one responsible for the packaging of the SDF)
Co-Founder
OpenNETCF.org

Principle Partner
OpenNETCF Consulting, LLC



Hi,

I've posted this on the OpenNetCF forum, but since this place is usually more
active and there are a lot of SDF users here, I figured this could be of
benefit to others here as well...

A couple of questions (I did some searches but didn't run into anything that
seemed to address this:)

I've been fiddling around with the SDF for a few days (first with 1.1, now
with 1.2.) I've added a "JumpToAnchor" method to the HTML viewer (I need it
in my app) and now I'm having a little problem deploying the modified SDF. I
recompiled (lots of warnings in there, by the way [;)]) and then went to
recreate the CAB file (Build Cab). However, the resulting CAB is much smaller
than the one copied by the SDF installer to the VS.Net directory structure -
in fact it looks like multiple CAB files are being created, while the SDF
installer has everything in one CAB file?

I copied the new OpenNetCF.Windows.Forms.dll file to the VS.Net location, but
since it is redeploying the CAB file, the changes are not reflected and the
application crashes with a TypeLoadException. I found that copying the dll to
the application's directory on the PDA solves that.. However I'm looking for a
more robust solution. So essentially I'd like to know how to rebuild the CAB
file correctly so I can copy it as-is to the VS.Net directory so it gets
redeployed correctly.

I'd also like to know where the DLLs end up. After copying the DLL myself, I
can see it using the Windows Explorer, but before that I could not see it (nor
can I see any of the other DLLs.)
 
P

Peter Foot [MVP]

I'll make sure JumpToAnchor is added to the HTMLViewer for the next version
and source-drop. However in the meantime if you want any help with the
implementation let me know. In particular make sure you are using the
DTM_ANCHORW message code since the text passed will be Unicode, also make
sure you append a null character to the end of the string ("\0").

Peter

--
Peter Foot
Windows Embedded MVP
www.inthehand.com | www.opennetcf.org

Michel Renaud said:
*LOL*

Let's just say if I don't get this to work, I won't be allowed to use the
SDF. :)

Incidentally after posting this I realized my "JumpToAnchor" function
didn't work, even though I had done something similar to another HTML
viewer custom control a while back. Monday's here, gotta get back to
where I was on Friday: Hell. LOL

Neil Cowburn said:
Michel,

You want us to give away ALL our secrets? :)

I will follow-up with you after the weekend.

--Neil

Neil Cowburn (the one responsible for the packaging of the SDF)
Co-Founder
OpenNETCF.org

Principle Partner
OpenNETCF Consulting, LLC



Hi,

I've posted this on the OpenNetCF forum, but since this place is
usually more
active and there are a lot of SDF users here, I figured this could be
of
benefit to others here as well...

A couple of questions (I did some searches but didn't run into anything
that
seemed to address this:)

I've been fiddling around with the SDF for a few days (first with 1.1,
now
with 1.2.) I've added a "JumpToAnchor" method to the HTML viewer (I
need it
in my app) and now I'm having a little problem deploying the modified
SDF. I
recompiled (lots of warnings in there, by the way [;)]) and then went
to
recreate the CAB file (Build Cab). However, the resulting CAB is much
smaller
than the one copied by the SDF installer to the VS.Net directory
structure -
in fact it looks like multiple CAB files are being created, while the
SDF
installer has everything in one CAB file?

I copied the new OpenNetCF.Windows.Forms.dll file to the VS.Net
location, but
since it is redeploying the CAB file, the changes are not reflected and
the
application crashes with a TypeLoadException. I found that copying the
dll to
the application's directory on the PDA solves that.. However I'm
looking for a
more robust solution. So essentially I'd like to know how to rebuild
the CAB
file correctly so I can copy it as-is to the VS.Net directory so it
gets
redeployed correctly.

I'd also like to know where the DLLs end up. After copying the DLL
myself, I
can see it using the Windows Explorer, but before that I could not see
it (nor
can I see any of the other DLLs.)
 
N

Neil Cowburn [MVP]

Michel,

Can you email me please? I'd like to continue with this offline (for now).

Thanks
Neil


Michel Renaud said:
*LOL*

Let's just say if I don't get this to work, I won't be allowed to use the
SDF. :)

Incidentally after posting this I realized my "JumpToAnchor" function
didn't work, even though I had done something similar to another HTML
viewer custom control a while back. Monday's here, gotta get back to
where I was on Friday: Hell. LOL

Neil Cowburn said:
Michel,

You want us to give away ALL our secrets? :)

I will follow-up with you after the weekend.

--Neil

Neil Cowburn (the one responsible for the packaging of the SDF)
Co-Founder
OpenNETCF.org

Principle Partner
OpenNETCF Consulting, LLC



Hi,

I've posted this on the OpenNetCF forum, but since this place is
usually more
active and there are a lot of SDF users here, I figured this could be
of
benefit to others here as well...

A couple of questions (I did some searches but didn't run into anything
that
seemed to address this:)

I've been fiddling around with the SDF for a few days (first with 1.1,
now
with 1.2.) I've added a "JumpToAnchor" method to the HTML viewer (I
need it
in my app) and now I'm having a little problem deploying the modified
SDF. I
recompiled (lots of warnings in there, by the way [;)]) and then went
to
recreate the CAB file (Build Cab). However, the resulting CAB is much
smaller
than the one copied by the SDF installer to the VS.Net directory
structure -
in fact it looks like multiple CAB files are being created, while the
SDF
installer has everything in one CAB file?

I copied the new OpenNetCF.Windows.Forms.dll file to the VS.Net
location, but
since it is redeploying the CAB file, the changes are not reflected and
the
application crashes with a TypeLoadException. I found that copying the
dll to
the application's directory on the PDA solves that.. However I'm
looking for a
more robust solution. So essentially I'd like to know how to rebuild
the CAB
file correctly so I can copy it as-is to the VS.Net directory so it
gets
redeployed correctly.

I'd also like to know where the DLLs end up. After copying the DLL
myself, I
can see it using the Windows Explorer, but before that I could not see
it (nor
can I see any of the other DLLs.)
 
G

Guest

This is what I have right now (I cannibalized the AddText method to come up with this):

#region JumpToAnchor Method
/// <summary>
/// Jumps to a named anchor in the current document
/// </summary>
public void JumpToAnchor(string text)
{
#if !DESIGN
//allocate temporary native buffer
IntPtr stringptr = MarshalEx.StringToHGlobalUni(text + '\0');
m_msgwnd.SendMessage((int)HtmlMessage.AnchorW,-1,(int)stringptr);

#endif
}

#endregion

Peter Foot said:
I'll make sure JumpToAnchor is added to the HTMLViewer for the next version
and source-drop. However in the meantime if you want any help with the
implementation let me know. In particular make sure you are using the
DTM_ANCHORW message code since the text passed will be Unicode, also make
sure you append a null character to the end of the string ("\0").

Peter

--
Peter Foot
Windows Embedded MVP
www.inthehand.com | www.opennetcf.org

Michel Renaud said:
*LOL*

Let's just say if I don't get this to work, I won't be allowed to use the
SDF. :)

Incidentally after posting this I realized my "JumpToAnchor" function
didn't work, even though I had done something similar to another HTML
viewer custom control a while back. Monday's here, gotta get back to
where I was on Friday: Hell. LOL

Neil Cowburn said:
Michel,

You want us to give away ALL our secrets? :)

I will follow-up with you after the weekend.

--Neil

Neil Cowburn (the one responsible for the packaging of the SDF)
Co-Founder
OpenNETCF.org

Principle Partner
OpenNETCF Consulting, LLC



On 16/7/04 6:17 pm, in article
(e-mail address removed), "Michel Renaud"

Hi,

I've posted this on the OpenNetCF forum, but since this place is
usually more
active and there are a lot of SDF users here, I figured this could be
of
benefit to others here as well...

A couple of questions (I did some searches but didn't run into anything
that
seemed to address this:)

I've been fiddling around with the SDF for a few days (first with 1.1,
now
with 1.2.) I've added a "JumpToAnchor" method to the HTML viewer (I
need it
in my app) and now I'm having a little problem deploying the modified
SDF. I
recompiled (lots of warnings in there, by the way [;)]) and then went
to
recreate the CAB file (Build Cab). However, the resulting CAB is much
smaller
than the one copied by the SDF installer to the VS.Net directory
structure -
in fact it looks like multiple CAB files are being created, while the
SDF
installer has everything in one CAB file?

I copied the new OpenNetCF.Windows.Forms.dll file to the VS.Net
location, but
since it is redeploying the CAB file, the changes are not reflected and
the
application crashes with a TypeLoadException. I found that copying the
dll to
the application's directory on the PDA solves that.. However I'm
looking for a
more robust solution. So essentially I'd like to know how to rebuild
the CAB
file correctly so I can copy it as-is to the VS.Net directory so it
gets
redeployed correctly.

I'd also like to know where the DLLs end up. After copying the DLL
myself, I
can see it using the Windows Explorer, but before that I could not see
it (nor
can I see any of the other DLLs.)
 
G

Guest

The e-mail address in your profile bounced. I assume it's rigged to prevent spam, but I'm not sure which part(s) should be removed?

thanks,
Michel

Neil Cowburn said:
Michel,

Can you email me please? I'd like to continue with this offline (for now).

Thanks
Neil


Michel Renaud said:
*LOL*

Let's just say if I don't get this to work, I won't be allowed to use the
SDF. :)

Incidentally after posting this I realized my "JumpToAnchor" function
didn't work, even though I had done something similar to another HTML
viewer custom control a while back. Monday's here, gotta get back to
where I was on Friday: Hell. LOL

Neil Cowburn said:
Michel,

You want us to give away ALL our secrets? :)

I will follow-up with you after the weekend.

--Neil

Neil Cowburn (the one responsible for the packaging of the SDF)
Co-Founder
OpenNETCF.org

Principle Partner
OpenNETCF Consulting, LLC



On 16/7/04 6:17 pm, in article
(e-mail address removed), "Michel Renaud"

Hi,

I've posted this on the OpenNetCF forum, but since this place is
usually more
active and there are a lot of SDF users here, I figured this could be
of
benefit to others here as well...

A couple of questions (I did some searches but didn't run into anything
that
seemed to address this:)

I've been fiddling around with the SDF for a few days (first with 1.1,
now
with 1.2.) I've added a "JumpToAnchor" method to the HTML viewer (I
need it
in my app) and now I'm having a little problem deploying the modified
SDF. I
recompiled (lots of warnings in there, by the way [;)]) and then went
to
recreate the CAB file (Build Cab). However, the resulting CAB is much
smaller
than the one copied by the SDF installer to the VS.Net directory
structure -
in fact it looks like multiple CAB files are being created, while the
SDF
installer has everything in one CAB file?

I copied the new OpenNetCF.Windows.Forms.dll file to the VS.Net
location, but
since it is redeploying the CAB file, the changes are not reflected and
the
application crashes with a TypeLoadException. I found that copying the
dll to
the application's directory on the PDA solves that.. However I'm
looking for a
more robust solution. So essentially I'd like to know how to rebuild
the CAB
file correctly so I can copy it as-is to the VS.Net directory so it
gets
redeployed correctly.

I'd also like to know where the DLLs end up. After copying the DLL
myself, I
can see it using the Windows Explorer, but before that I could not see
it (nor
can I see any of the other DLLs.)
 
N

Neil Cowburn [MVP]

Email me at neilc[at]opennetcf.org

Thanks
Neil


Michel Renaud said:
The e-mail address in your profile bounced. I assume it's rigged to
prevent spam, but I'm not sure which part(s) should be removed?

thanks,
Michel

Neil Cowburn said:
Michel,

Can you email me please? I'd like to continue with this offline (for
now).

Thanks
Neil


Michel Renaud said:
*LOL*

Let's just say if I don't get this to work, I won't be allowed to use
the
SDF. :)

Incidentally after posting this I realized my "JumpToAnchor" function
didn't work, even though I had done something similar to another HTML
viewer custom control a while back. Monday's here, gotta get back to
where I was on Friday: Hell. LOL

:

Michel,

You want us to give away ALL our secrets? :)

I will follow-up with you after the weekend.

--Neil

Neil Cowburn (the one responsible for the packaging of the SDF)
Co-Founder
OpenNETCF.org

Principle Partner
OpenNETCF Consulting, LLC



On 16/7/04 6:17 pm, in article
(e-mail address removed), "Michel Renaud"

Hi,

I've posted this on the OpenNetCF forum, but since this place is
usually more
active and there are a lot of SDF users here, I figured this could
be
of
benefit to others here as well...

A couple of questions (I did some searches but didn't run into
anything
that
seemed to address this:)

I've been fiddling around with the SDF for a few days (first with
1.1,
now
with 1.2.) I've added a "JumpToAnchor" method to the HTML viewer (I
need it
in my app) and now I'm having a little problem deploying the
modified
SDF. I
recompiled (lots of warnings in there, by the way [;)]) and then
went
to
recreate the CAB file (Build Cab). However, the resulting CAB is
much
smaller
than the one copied by the SDF installer to the VS.Net directory
structure -
in fact it looks like multiple CAB files are being created, while
the
SDF
installer has everything in one CAB file?

I copied the new OpenNetCF.Windows.Forms.dll file to the VS.Net
location, but
since it is redeploying the CAB file, the changes are not reflected
and
the
application crashes with a TypeLoadException. I found that copying
the
dll to
the application's directory on the PDA solves that.. However I'm
looking for a
more robust solution. So essentially I'd like to know how to
rebuild
the CAB
file correctly so I can copy it as-is to the VS.Net directory so it
gets
redeployed correctly.

I'd also like to know where the DLLs end up. After copying the DLL
myself, I
can see it using the Windows Explorer, but before that I could not
see
it (nor
can I see any of the other DLLs.)
 
P

Peter Foot [MVP]

I've just added in the code and it seems to be working. The only difference
is I'm passing 0 in the WParam field e.g.

//allocate native string
IntPtr stringptr = MarshalEx.StringToHGlobalUni(value + "\0");

//send message
m_msgwnd.SendMessage((int)HtmlMessage.AnchorW,0,(int)stringptr);

//free native string
MarshalEx.FreeHGlobal(stringptr);

I then tested by setting the Url property to http://wiki.opennetcf.org. I
set a button with the following action

htmlViewer1.JumpToAnchor("h4");

Which causes the viewer to jump to the section "Create New Content for The
Community". I'll upload the source to the online source-browser shortly.

Peter

--
Peter Foot
Windows Embedded MVP
www.inthehand.com | www.opennetcf.org

Michel Renaud said:
This is what I have right now (I cannibalized the AddText method to come
up with this):

#region JumpToAnchor Method
/// <summary>
/// Jumps to a named anchor in the current document
/// </summary>
public void JumpToAnchor(string text)
{
#if !DESIGN
//allocate temporary native buffer
IntPtr stringptr = MarshalEx.StringToHGlobalUni(text + '\0');
m_msgwnd.SendMessage((int)HtmlMessage.AnchorW,-1,(int)stringptr);

#endif
}

#endregion

Peter Foot said:
I'll make sure JumpToAnchor is added to the HTMLViewer for the next
version
and source-drop. However in the meantime if you want any help with the
implementation let me know. In particular make sure you are using the
DTM_ANCHORW message code since the text passed will be Unicode, also make
sure you append a null character to the end of the string ("\0").

Peter

--
Peter Foot
Windows Embedded MVP
www.inthehand.com | www.opennetcf.org

Michel Renaud said:
*LOL*

Let's just say if I don't get this to work, I won't be allowed to use
the
SDF. :)

Incidentally after posting this I realized my "JumpToAnchor" function
didn't work, even though I had done something similar to another HTML
viewer custom control a while back. Monday's here, gotta get back to
where I was on Friday: Hell. LOL

:

Michel,

You want us to give away ALL our secrets? :)

I will follow-up with you after the weekend.

--Neil

Neil Cowburn (the one responsible for the packaging of the SDF)
Co-Founder
OpenNETCF.org

Principle Partner
OpenNETCF Consulting, LLC



On 16/7/04 6:17 pm, in article
(e-mail address removed), "Michel Renaud"

Hi,

I've posted this on the OpenNetCF forum, but since this place is
usually more
active and there are a lot of SDF users here, I figured this could
be
of
benefit to others here as well...

A couple of questions (I did some searches but didn't run into
anything
that
seemed to address this:)

I've been fiddling around with the SDF for a few days (first with
1.1,
now
with 1.2.) I've added a "JumpToAnchor" method to the HTML viewer (I
need it
in my app) and now I'm having a little problem deploying the
modified
SDF. I
recompiled (lots of warnings in there, by the way [;)]) and then
went
to
recreate the CAB file (Build Cab). However, the resulting CAB is
much
smaller
than the one copied by the SDF installer to the VS.Net directory
structure -
in fact it looks like multiple CAB files are being created, while
the
SDF
installer has everything in one CAB file?

I copied the new OpenNetCF.Windows.Forms.dll file to the VS.Net
location, but
since it is redeploying the CAB file, the changes are not reflected
and
the
application crashes with a TypeLoadException. I found that copying
the
dll to
the application's directory on the PDA solves that.. However I'm
looking for a
more robust solution. So essentially I'd like to know how to
rebuild
the CAB
file correctly so I can copy it as-is to the VS.Net directory so it
gets
redeployed correctly.

I'd also like to know where the DLLs end up. After copying the DLL
myself, I
can see it using the Windows Explorer, but before that I could not
see
it (nor
can I see any of the other DLLs.)
 
P

Peter Foot [MVP]

It's possible that the message is not supported on all devices, the docs
indicate that it works on Pocket PC / Smartphone 2002 devices onwards and
therefore on Pocket PC 2000 or CE.NET devices it may be missing...

Peter

--
Peter Foot
Windows Embedded MVP
www.inthehand.com | www.opennetcf.org

Michel Renaud said:
I was also using 0 for WParam but to no avail, that's why the -1 was in
there - experimentation. Obviously if it works for you, I must have done
something wrong somewhere - blame it on Friday? :) I'll check my code and
other stuff to see if I can find the culprit.

thanks!
Michel

Peter Foot said:
I've just added in the code and it seems to be working. The only
difference
is I'm passing 0 in the WParam field e.g.

//allocate native string
IntPtr stringptr = MarshalEx.StringToHGlobalUni(value + "\0");

//send message
m_msgwnd.SendMessage((int)HtmlMessage.AnchorW,0,(int)stringptr);

//free native string
MarshalEx.FreeHGlobal(stringptr);

I then tested by setting the Url property to http://wiki.opennetcf.org. I
set a button with the following action

htmlViewer1.JumpToAnchor("h4");

Which causes the viewer to jump to the section "Create New Content for
The
Community". I'll upload the source to the online source-browser shortly.

Peter

--
Peter Foot
Windows Embedded MVP
www.inthehand.com | www.opennetcf.org

Michel Renaud said:
This is what I have right now (I cannibalized the AddText method to
come
up with this):

#region JumpToAnchor Method
/// <summary>
/// Jumps to a named anchor in the current document
/// </summary>
public void JumpToAnchor(string text)
{
#if !DESIGN
//allocate temporary native buffer
IntPtr stringptr = MarshalEx.StringToHGlobalUni(text + '\0');
m_msgwnd.SendMessage((int)HtmlMessage.AnchorW,-1,(int)stringptr);

#endif
}

#endregion

:

I'll make sure JumpToAnchor is added to the HTMLViewer for the next
version
and source-drop. However in the meantime if you want any help with the
implementation let me know. In particular make sure you are using the
DTM_ANCHORW message code since the text passed will be Unicode, also
make
sure you append a null character to the end of the string ("\0").

Peter

--
Peter Foot
Windows Embedded MVP
www.inthehand.com | www.opennetcf.org

message
*LOL*

Let's just say if I don't get this to work, I won't be allowed to
use
the
SDF. :)

Incidentally after posting this I realized my "JumpToAnchor"
function
didn't work, even though I had done something similar to another
HTML
viewer custom control a while back. Monday's here, gotta get back
to
where I was on Friday: Hell. LOL

:

Michel,

You want us to give away ALL our secrets? :)

I will follow-up with you after the weekend.

--Neil

Neil Cowburn (the one responsible for the packaging of the SDF)
Co-Founder
OpenNETCF.org

Principle Partner
OpenNETCF Consulting, LLC



On 16/7/04 6:17 pm, in article
(e-mail address removed), "Michel Renaud"

Hi,

I've posted this on the OpenNetCF forum, but since this place is
usually more
active and there are a lot of SDF users here, I figured this
could
be
of
benefit to others here as well...

A couple of questions (I did some searches but didn't run into
anything
that
seemed to address this:)

I've been fiddling around with the SDF for a few days (first with
1.1,
now
with 1.2.) I've added a "JumpToAnchor" method to the HTML viewer
(I
need it
in my app) and now I'm having a little problem deploying the
modified
SDF. I
recompiled (lots of warnings in there, by the way [;)]) and then
went
to
recreate the CAB file (Build Cab). However, the resulting CAB is
much
smaller
than the one copied by the SDF installer to the VS.Net directory
structure -
in fact it looks like multiple CAB files are being created, while
the
SDF
installer has everything in one CAB file?

I copied the new OpenNetCF.Windows.Forms.dll file to the VS.Net
location, but
since it is redeploying the CAB file, the changes are not
reflected
and
the
application crashes with a TypeLoadException. I found that
copying
the
dll to
the application's directory on the PDA solves that.. However I'm
looking for a
more robust solution. So essentially I'd like to know how to
rebuild
the CAB
file correctly so I can copy it as-is to the VS.Net directory so
it
gets
redeployed correctly.

I'd also like to know where the DLLs end up. After copying the
DLL
myself, I
can see it using the Windows Explorer, but before that I could
not
see
it (nor
can I see any of the other DLLs.)
 
G

Guest

It's working now, for some reason. I didn't change the code except put 0 back instead of -1. I think I might just have deployed the wrong copy of the DLL when I was working on it last Friday, that's the only thing I can see.

thanks!
Michel

Peter Foot said:
It's possible that the message is not supported on all devices, the docs
indicate that it works on Pocket PC / Smartphone 2002 devices onwards and
therefore on Pocket PC 2000 or CE.NET devices it may be missing...

Peter

--
Peter Foot
Windows Embedded MVP
www.inthehand.com | www.opennetcf.org

Michel Renaud said:
I was also using 0 for WParam but to no avail, that's why the -1 was in
there - experimentation. Obviously if it works for you, I must have done
something wrong somewhere - blame it on Friday? :) I'll check my code and
other stuff to see if I can find the culprit.

thanks!
Michel

Peter Foot said:
I've just added in the code and it seems to be working. The only
difference
is I'm passing 0 in the WParam field e.g.

//allocate native string
IntPtr stringptr = MarshalEx.StringToHGlobalUni(value + "\0");

//send message
m_msgwnd.SendMessage((int)HtmlMessage.AnchorW,0,(int)stringptr);

//free native string
MarshalEx.FreeHGlobal(stringptr);

I then tested by setting the Url property to http://wiki.opennetcf.org. I
set a button with the following action

htmlViewer1.JumpToAnchor("h4");

Which causes the viewer to jump to the section "Create New Content for
The
Community". I'll upload the source to the online source-browser shortly.

Peter

--
Peter Foot
Windows Embedded MVP
www.inthehand.com | www.opennetcf.org

This is what I have right now (I cannibalized the AddText method to
come
up with this):

#region JumpToAnchor Method
/// <summary>
/// Jumps to a named anchor in the current document
/// </summary>
public void JumpToAnchor(string text)
{
#if !DESIGN
//allocate temporary native buffer
IntPtr stringptr = MarshalEx.StringToHGlobalUni(text + '\0');
m_msgwnd.SendMessage((int)HtmlMessage.AnchorW,-1,(int)stringptr);

#endif
}

#endregion

:

I'll make sure JumpToAnchor is added to the HTMLViewer for the next
version
and source-drop. However in the meantime if you want any help with the
implementation let me know. In particular make sure you are using the
DTM_ANCHORW message code since the text passed will be Unicode, also
make
sure you append a null character to the end of the string ("\0").

Peter

--
Peter Foot
Windows Embedded MVP
www.inthehand.com | www.opennetcf.org

message
*LOL*

Let's just say if I don't get this to work, I won't be allowed to
use
the
SDF. :)

Incidentally after posting this I realized my "JumpToAnchor"
function
didn't work, even though I had done something similar to another
HTML
viewer custom control a while back. Monday's here, gotta get back
to
where I was on Friday: Hell. LOL

:

Michel,

You want us to give away ALL our secrets? :)

I will follow-up with you after the weekend.

--Neil

Neil Cowburn (the one responsible for the packaging of the SDF)
Co-Founder
OpenNETCF.org

Principle Partner
OpenNETCF Consulting, LLC



On 16/7/04 6:17 pm, in article
(e-mail address removed), "Michel Renaud"

Hi,

I've posted this on the OpenNetCF forum, but since this place is
usually more
active and there are a lot of SDF users here, I figured this
could
be
of
benefit to others here as well...

A couple of questions (I did some searches but didn't run into
anything
that
seemed to address this:)

I've been fiddling around with the SDF for a few days (first with
1.1,
now
with 1.2.) I've added a "JumpToAnchor" method to the HTML viewer
(I
need it
in my app) and now I'm having a little problem deploying the
modified
SDF. I
recompiled (lots of warnings in there, by the way [;)]) and then
went
to
recreate the CAB file (Build Cab). However, the resulting CAB is
much
smaller
than the one copied by the SDF installer to the VS.Net directory
structure -
in fact it looks like multiple CAB files are being created, while
the
SDF
installer has everything in one CAB file?

I copied the new OpenNetCF.Windows.Forms.dll file to the VS.Net
location, but
since it is redeploying the CAB file, the changes are not
reflected
and
the
application crashes with a TypeLoadException. I found that
copying
the
dll to
the application's directory on the PDA solves that.. However I'm
looking for a
more robust solution. So essentially I'd like to know how to
rebuild
the CAB
file correctly so I can copy it as-is to the VS.Net directory so
it
gets
redeployed correctly.

I'd also like to know where the DLLs end up. After copying the
DLL
myself, I
can see it using the Windows Explorer, but before that I could
not
see
it (nor
can I see any of the other DLLs.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top