'
' frmTestOle        J.Philippe, Frbruary 12th, 2003
'
$TYPECHECK ON
'
Const FALSE = 0:Const TRUE = 1
Const CRLF = Chr$(10) & Chr$(13)
'
Declare Function DeleteUrlCacheEntry Lib "wininet.dll" Alias "DeleteUrlCacheEntryA" (ByRef lpszUrlName As String) As Long
'
Declare Sub OnClose_frmTestOle
Declare Sub OnClic_AnyMenu (Sender As QMenuItem)
'
Create frmTestOle As QForm
    WindowState = 2 ' wsMaximized
    Caption = "frmTestOle V 1.0.0                      Loading URL in INTERNET EXPLORER" 
    OnClose = OnClose_frmTestOle
    Visible = True
    Create oleIE As QOleContainer
        Align = 5 ' =alClient
        createObject("Shell.Explorer.1")        
    End Create
    Visible = False
End Create
'
DefStr sURL = "http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dninvbs/html/theinternetexplorerobjectmodel.asp"
'
frmTestOle.Show
'
DeleteUrlCacheEntry (sURL)  ' Delete the entry from the cache, forces a new download
'
oleIE.Navigate (sUrl)
'
Do               ' bugs without this
    DoEvents
Loop Until oleIE.Busy = False
'
frmTestOle.Caption = "frmTestOle V 1.0.0               Loaded"
'
' OLE IE PROPERTIES TEST
DefInt iReturn = MessageDlg (("        Application = " & Str$(oleIe.Application)            & "     ???" _
   & CRLF & "          Busy Flag = " & Str$(oleIE.Busy)                   & "     Work  0, -1)" _
   & CRLF & "           Document = " & Str$(oleIE.Document)               & "     ???" _
   & CRLF & "             Height = " & Str$(oleIE.Height)                 & "     in OLeContainer" _
   & CRLF & "              Width = " & Str$(oleIE.Width)                  & "     in OleContainer" _
   & CRLF & "       LocationName = " & oleIE.LocationName                 & "     Works" _
   & CRLF & "        LocationUrl = " & oleIE.LocationUrl                  & "     Works" _
   & CRLF & "             Parent = " & Str$(oleIE.Parent)                 & "     " _
   & CRLF & "  TopLevelContainer = " & Str$(oleIE.TopLevelContainer)      & "     " _
   & CRLF & "               Type = " & oleIE.Type                         & "     "), 2, 4, 0) 'mtInformation,MBOK
'
' The Following Properties Bug :
'             & "\n FullScreen = " & Str$(oleIE.FullScreen)  ' bugs
'             & "\n   FullName = " & oleIE.FullName          ' bugs
'             & "\n       Name = " & oleIE.Name              ' bugs
'             & "\n       Path = " & oleIE.Path              ' bugs
'             & "\n  StatusBar = " & Str$(oleIE.StatusBar)   ' bugs
'             & "\n    StatusText = " & oleIE.StatusText     ' bugs             
'             & "\n       ToolBar = " & Str$(oleIE.ToolBar)  ' bugs
'             & "\n       Visible = " & Str$(oleIE.Visible)  ' bugs yet in OleContainer ???
'  I Dont even try Methods :)
'
frmTestOle.Caption = "frmTestOle V 1.0.0" 
'
' *************************************
frmTestOle.Visible = False
frmTestOle.ShowModal
' *************************************
'
Sub OnClose_frmTestOle
    Application.Terminate
    End
End Sub
'
