Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

DFM Support

67 views
Skip to first unread message

Rafael Medeiros

unread,
Oct 21, 2001, 1:32:52 AM10/21/01
to
Hi,

Does anyone know any good library to work with DFM files? Any help will be
appreciated.

TIA,

R Medeiros


Mike Orriss (TeamB)

unread,
Oct 21, 2001, 4:00:46 AM10/21/01
to
In article <3bd25dfd_2@dnews>, Rafael Medeiros wrote:
> Does anyone know any good library to work with DFM files?
>

To do what exactly? I don't understand.

Mike Orriss (TeamB and DevExpress)


Rafael Medeiros

unread,
Oct 21, 2001, 5:20:35 AM10/21/01
to
Hi Mike,

Actually, I want to get a DFM file and be able to read its components and
their properties.
I tried with TStream, and TFiler, but everytime I try to use
ObjectBinaryToText to convert my Binary DFM to text, I get an error message
saying "Invalid Stream Format". Do you know how to solve this?
Sometimes I'll need to get 2 different DFM files, and check if they have the
same Component (for example), the same name, same ClassType, and eventually
check some properties...

TIA,

R Medeiros

"Mike Orriss (TeamB)" <m...@3kcc.co.uk> wrote in message
news:VA.00002652.0edf31bb@pcmike1...

Mike Orriss (TeamB)

unread,
Oct 21, 2001, 8:29:29 AM10/21/01
to
In article <3bd29365_2@dnews>, Rafael Medeiros wrote:
> I tried with TStream, and TFiler, but everytime I try to use
> ObjectBinaryToText to convert my Binary DFM to text, I get an error message
> saying "Invalid Stream Format". Do you know how to solve this?
>

The easiest method is to save your dfm files as text to begin with.

Rafael Medeiros

unread,
Oct 21, 2001, 7:59:03 PM10/21/01
to
You mean, change its extension to a Txt? As it's a Binary file, I was trying
to use ObjectBinaryToText procedure that does exactly what you suggested.
But I was always receiving an error message: Invalid Stream Format......Do
you know how to solve that?

TIA,

R Medeiros
"Mike Orriss (TeamB)" <m...@3kcc.co.uk> wrote in message

news:VA.00002655.0fd53565@pcmike1...

James Jacobson

unread,
Oct 21, 2001, 8:18:24 PM10/21/01
to
In article <3bd36133$1_2@dnews>, rafaelm...@msn.com says...

> You mean, change its extension to a Txt? As it's a Binary file, I was trying
> to use ObjectBinaryToText procedure that does exactly what you suggested.
> But I was always receiving an error message: Invalid Stream Format......Do
> you know how to solve that?
try ObjectResourceToText

Jim

Jeff Overcash (TeamB)

unread,
Oct 22, 2001, 12:31:39 AM10/22/01
to
Starting in D5 the default format for a DFM is text not binary so more than
likely this is your problem. You are trying to treat a text DFM as if it were
binary.

Rafael Medeiros wrote:
>
> You mean, change its extension to a Txt? As it's a Binary file, I was trying
> to use ObjectBinaryToText procedure that does exactly what you suggested.
> But I was always receiving an error message: Invalid Stream Format......Do
> you know how to solve that?
>
> TIA,
>


--
Jeff Overcash (TeamB) | Talk about failure
(Please do not email | To fall is not to fail
me directly unless | Failure isn't about falling down
asked. Thank You) | Failure is staying down (Marillion)

Leicester "Brad" Ford Jr.

unread,
Oct 22, 2001, 2:39:20 AM10/22/01
to
"Jeff Overcash (TeamB)" <over...@onramp.net> wrote:

>Starting in D5 the default format for a DFM is text not binary so more than
>likely this is your problem. You are trying to treat a text DFM as if it were
>binary.
>
>Rafael Medeiros wrote:
>>
>> You mean, change its extension to a Txt? As it's a Binary file, I was trying
>> to use ObjectBinaryToText procedure that does exactly what you suggested.
>> But I was always receiving an error message: Invalid Stream Format......Do
>> you know how to solve that?
>>
>> TIA,
>>

Sorry, I don't think the DEFAULT was text, I am pretty sure the
default was still binary but could be set via (Tools | Environment
Options) and on the Designer tab, checking "New forms as text".

"I think" that it was the default in D6 though... but I may be wrong,
I don't remember (my brain is mush, for those Piers Anthony fans).

Even after making this change you still need to make a minor change to
the form to make sure that it rewrites the DFM.
--------------------------------------------
Regards,
Brad

(Remove the "X" in the email address to reply)

Rafael Medeiros

unread,
Oct 22, 2001, 6:57:19 PM10/22/01
to
James,

Thank you for your suggestion, but I had tried this before, and it didn't
work also.

TIA,

R Medeiros
"James Jacobson" <jd...@att.net> wrote in message
news:MPG.163d21c91...@forums.borland.com...

Rafael Medeiros

unread,
Oct 22, 2001, 7:10:24 PM10/22/01
to
Brad,

Yes you are right. But I'm developing this application for Delphi 4 users.
They will not migrate to Delphi 6 now, for sure. So, I know that if they use
D4, their DFM files are in Binary format...Have you guys seen any good
library to manipulate DFMs?

TIA,

Rafael Medeiros
"Leicester "Brad" Ford Jr." <Xbf...@lbfConsulting.com> wrote in message
news:iff7ttct4kajmas6l...@4ax.com...

Vik

unread,
Oct 22, 2001, 7:10:05 PM10/22/01
to
Rafael Medeiros said:
> Yes you are right. But I'm developing this application for Delphi
> 4 users. They will not migrate to Delphi 6 now, for sure. So, I
> know that if they use D4, their DFM files are in Binary
> format...Have you guys seen any good library to manipulate DFMs?

What exactly do you want to do with them that the IDE can't do?
--
Vik

Leicester "Brad" Ford Jr.

unread,
Oct 22, 2001, 7:27:40 PM10/22/01
to

"Rafael Medeiros" <rbmed...@ig.com.br> wrote:

>Brad,
>
>Yes you are right. But I'm developing this application for Delphi 4 users.
>They will not migrate to Delphi 6 now, for sure. So, I know that if they use
>D4, their DFM files are in Binary format...Have you guys seen any good
>library to manipulate DFMs?

Delphi comes with a CONVERT.exe routine which does just that (converts
from binary to text), for an easy one time fix (after that just use
the text files).

0 new messages