Added Debug menu and menu option to list the IOleCommandTarget supported commands on each control

This commit is contained in:
locka%iol.ie 1998-12-13 21:43:25 +00:00
parent d1c44bd4ed
commit 62c8ffa530
4 changed files with 25 additions and 42 deletions

View File

@ -1,37 +0,0 @@
Type=Exe
Form=browser.frm
Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\winnt\System32\stdole2.tlb#OLE Automation
Object={1339B53E-3453-11D2-93B9-000000000000}#1.0#0; MozillaControl.dll
Object={F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.1#0; comdlg32.ocx
Object={FE0065C0-1B7B-11CF-9D53-00AA003C9CB6}#1.0#0; comct232.ocx
Object={6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.2#0; comctl32.ocx
Form=frmToolBar.frm
Object={EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}#1.1#0; shdocvw.dll
Form=frmExplorer.frm
IconForm="frmMozilla"
Startup="frmToolBar"
HelpFile=""
ExeName32="VBrowse.exe"
Command32=""
Name="Project1"
HelpContextID="0"
CompatibleMode="0"
MajorVer=1
MinorVer=0
RevisionVer=0
AutoIncrementVer=0
ServerSupportFiles=0
CompilationType=0
OptimizationType=0
FavorPentiumPro(tm)=0
CodeViewDebugInfo=0
NoAliasing=0
BoundsCheck=0
OverflowCheck=0
FlPointCheck=0
FDIVCheck=0
UnroundedFP=0
StartMode=0
Unattended=0
ThreadPerObject=0
MaxNumberOfThreads=1

View File

@ -16,7 +16,7 @@ Begin VB.Form frmMozilla
OleObjectBlob = "browser.frx":0000
TabIndex = 0
Top = 0
Width = 7575
Width = 7695
End
End
Attribute VB_Name = "frmMozilla"

View File

@ -3,8 +3,8 @@ Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.2#0"; "comctl32.ocx"
Begin VB.Form frmToolBar
Caption = "Control Bar"
ClientHeight = 1215
ClientLeft = 60
ClientTop = 345
ClientLeft = 165
ClientTop = 735
ClientWidth = 7965
LinkTopic = "Form2"
ScaleHeight = 81
@ -142,14 +142,12 @@ Begin VB.Form frmToolBar
AutoSize = 1
Object.Width = 11404
MinWidth = 2646
TextSave = ""
Object.Tag = ""
EndProperty
BeginProperty Panel2 {0713E89F-850A-101B-AFC0-4210102A8DA7}
Alignment = 2
Object.Width = 2117
MinWidth = 2117
TextSave = ""
Object.Tag = ""
EndProperty
EndProperty
@ -208,6 +206,12 @@ Begin VB.Form frmToolBar
EndProperty
EndProperty
End
Begin VB.Menu debug
Caption = "Debug"
Begin VB.Menu verbs
Caption = "OLE Verbs"
End
End
End
Attribute VB_Name = "frmToolBar"
Attribute VB_GlobalNameSpace = False
@ -276,3 +280,19 @@ Private Sub Toolbar1_ButtonClick(ByVal Button As ComctlLib.Button)
End Select
End Sub
Private Sub verbs_Click()
' Query the browser to see what IOleCommandTarget commands it supports
Dim nCmd As Integer
Dim nStatus As Integer
For nCmd = 1 To 40
nStatus = browser.QueryStatusWB(nCmd)
If nStatus And 1 Then
Debug.Print "Command " & nCmd & " is supported"
Else
Debug.Print "Command " & nCmd & " is not supported"
End If
If nStatus And 2 Then
Debug.Print "Command " & nCmd & " is disabled"
End If
Next
End Sub