Guest_imported
New member
- Jan 1, 1970
- 0
Hi!
I'm trying to write a function in Delphi 5 that fetches all Frame_urls of a document.
I found some help at the MSDN:
(Sub ReturnFrames()
'Returns the collection of all window objects defined in the
'current document.
Dim objFrm As IHTMLFramesCollection2
Dim i as Integer
Set objFrm = ActiveDocument.frames
'If there are frames in the document
If Not objFrm.Length = 0 Then
'For every frame in the collection
For i = 0 To objFrm.Length - 1
'Display name and location
MsgBox "The window " & objFrm(i).Name & _
"has the path: " & objFrm(i).location
Next i
Else
'Otherwise display message
MsgBox "There are no frames in the current document."
End If
End Sub
_________________
But the code is in VB and I need Delphi Code. I tried to convert it but I don't get it working!
Does an1 know an alternative methode to get the urls, or can someone help me to convert the code?
thnx
I'm trying to write a function in Delphi 5 that fetches all Frame_urls of a document.
I found some help at the MSDN:
(Sub ReturnFrames()
'Returns the collection of all window objects defined in the
'current document.
Dim objFrm As IHTMLFramesCollection2
Dim i as Integer
Set objFrm = ActiveDocument.frames
'If there are frames in the document
If Not objFrm.Length = 0 Then
'For every frame in the collection
For i = 0 To objFrm.Length - 1
'Display name and location
MsgBox "The window " & objFrm(i).Name & _
"has the path: " & objFrm(i).location
Next i
Else
'Otherwise display message
MsgBox "There are no frames in the current document."
End If
End Sub
_________________
But the code is in VB and I need Delphi Code. I tried to convert it but I don't get it working!
Does an1 know an alternative methode to get the urls, or can someone help me to convert the code?
thnx