Event | Type | Occurs when... | Params |
|
|
|
|
OnKeyDown | SUB (Key AS Word, Shift AS INTEGER) | Key held down | 2 |
OnKeyPress | SUB (Key AS BYTE) | User presses a key | 1 |
OnKeyUp | SUB (Key AS Word, Shift AS INTEGER) | User releases a key | 2 |
OnMouseDown | SUB (Button%, X%, Y%, Shift%) | Mouse button held down | 4 |
OnMouseMove | SUB (X%, Y%, Shift%) | Mouse moves | 3 |
OnMouseUp | SUB (Button%, X%, Y%, Shift%) | Mouse button is released | 4 |
OnObjectMove | SUB (Rect AS QRECT) | OLE Object has moved or resized | 1 |
OnResize | VOID | After OLE container is resized | 0 |
' frmTestOle J.Philippe, Frbruary 12th, 2003
$TYPECHECK ON
$INCLUDE "RapidQ.inc"
Const CRLF = Chr$(10) & Chr$(13)
'web site with properties and methods
DefStr sURL = "http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dninvbs/html/theinternetexplorerobjectmodel.asp"
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") 'also try "Shell.Explorer.2"
End Create
Visible = False
End Create
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
oleIE.Quit
oleIE.Free
Application.Terminate
End
End Sub
'