I'm trying to remove text items on a layout frame using the procedures below, Sometimes the text items are removed other times they still remain, even when the frame id has been found.
I've also used the 'Set Layout window layout_ID Frame Contents On' command to try and get it to refresh the layout to no avail.
The text items are created into the layout window with the 'name' option specified.
Previously in 32bit we just cleared the layout cosmetic layer containing the text.
Anyone have any ideas why it's not working consistently.
Thanks
Sub RemoveLayoutFrame(byval sFrameName as String)
dim iFrame as integer
iFrame = GetLayoutFrameID(sFrameName)
if iFrame > 0 then
Remove Designer Frame Window Layout_ID Id iFrame
end if
exit function
End Sub
'----------------------------------------
Function GetLayoutFrameID(byval sFrameName as string) as integer 'returns frame number for given frame also giFrameWiniD is set for WINID
dim iFrame as integer
giFrameWiniD = 0
iFrame = LayoutItemID(Layout_ID,sFrameName,-1)
if iFrame > 0 then
giFrameWiniD = LayoutItemInfo(layout_id, iFrame, LAYOUT_ITEM_INFO_WIN)
end if
GetLayoutFrameID = iFrame
exit function
End Function