damaged dfm files
I'm afraid you are out-of-luck, dude...
the header is screwed and the reader can not identify
the form's info.
If you don't mind my asking, how the heck did you{*word*222}this up?
The only way I know of is to open it in a hex editor and take a look there...
Also need a Hex->Decimal calculator...
I will show you how to decipher some of the values...I opened up a DFM
in Notepad and copied the resulting text to a text file. Then I opened the
same file in a Hex Editor and perused the values. I copied the textual values
from opening the dfm in Delphi in text mode...
From the binary DFM: (remember, little-endian)
TPanel {$07} (I think these values determine the nesting)
panBack {$04}
Left {$02$00$03} (Value = 0)
Top 4 {$02$34$05} (Value = 52)
Width {$03$FC$01$06} (Value = 508 Note:$1FC = 508
decimal)
Height {$02$1B$05} (Value = 27)
Align alTop {$07$05alTop$08} (Value = alTop)
AutoSize {$09$08} (Value = ??)
TabOrder {$02$01$07} (Value = 1)
Visible {$08$00$0B} (Value = 0 = False)
TTabControl {$04}
tabs {$04}
Left {$02$01$03} (Value = 1)
Top {$02$01$05} (Value = 1)
Width {$03$FA$01$06} (Value = 506)
Height {$02$19$05} (Value = 25)
Align alTop {$07$05alTop$08} (Value = alTop)
PopupMenu pmTabControl {$07$0CpmTabControl$08} (Value = pmTabControl)
TabOrder {$02$00$07} (Value = 0)
Visible {$08$0B} (Value = 0 = False)
OnChange tabsChange {$07$0A} (Value = tabsChange)
OnResize tabsResize {$07$0A} (Value = tabsResize)
From a textual representation of the DFM:
object panBack: TPanel
Left = 0
Top = 52
Width = 508
Height = 27
Align = alTop
AutoSize = True
TabOrder = 1
Visible = False
object tabs: TTabControl
Left = 1
Top = 1
Width = 506
Height = 25
Align = alTop
PopupMenu = pmTabControl
TabOrder = 0
Visible = False
OnChange = tabsChange
OnResize = tabsResize
end
end
w & n <wgrab...@h.o.t.m.a.i.l.com> wrote in message
news:pstX5.61261$3u1.18557163@news3.rdc1.on.home.com...
Quote
> does anyone know how to 'fix' dfm files? i have a damaged file (the first
> little bit is overwritten) and I want to recover what components are still
> intact in the stream. i've attached the file, please someone help.
> wojtek