PDA

View Full Version : .net cannot open native TX format created in v8


Unregistered
January 9, 2003, 18:25:28
Support,

What steps do I need to take to open into dot net native TX formats, .txm, created in v8.

Whenever I attempt to do so, I get my *cannot open file message*. I have passed as streamtype both InternatFormat and InternalUnicodeFormat, with the result the same for both.

Files in the format, .doc, .rtf and .txt all open fine, but not .txm's.


This message was originally posted by Vann Joe in the old TX Text Control Support Forum.

Meik Dankleff
January 21, 2003, 17:33:05
Just to make this one clear again. TXM files are not native text control format files. These files are created by the VB TX Words demo program and have a 30 byte header that contains document information like the page size. What follows the header is native TX format. The text control can not load the files directly. You have to skip the header.

Vann Joe
January 21, 2003, 18:35:16
Hi Meik,

Let's see if I'm finally understanding correctly:

1. Up until the release of the net version, the OCX native file format had no structures for storing page size and margins. Rather this need was added via hack in the published "how to work with" samples. The hack consisted of writing the values needed in a 30 byte header from the "native format" itself, then (in opening a txm file) reading and assigning those values to the control's page size and margins.

2. The .net native file format has undergone revision and now contains structures for paper size and margins.

3. Thus the OCX versions won't be able to open any txm files created by .net. And a Try block, such as I posted, is necessary for .net to open OCX txm's.

Meik Dankleff
January 21, 2003, 19:09:08
Not quite! Also the TX version 8 was able to save the document page size and margins in the document itself. No need for a header there.

But the MDI sample is very old (I don't know from which version) and so we left the header code in there over the versions to keep it compatible with prior versions. Actually, the whole thing could be left out, also in version 8.

Vann Joe
January 21, 2003, 19:50:47
Hi Meik!

My goodness! LOL! I sure wish such had been made known, even in just a comment in the sample apps.

We realize documenting things is time consuming, and generally takes a back seat to development/support etc. But in the long run documentation saves everyone a LOT of time.

LOL! Well too late now, our thousands of users have tens of thousands of templates with the unneeded header. We'll have to continue with the obsolete format, and support that in our new .net app. LOL!