📄 ftestapp.frm
字号:
VERSION 5.00
Object = "{00460180-9E5E-11D5-B7C8-B8269041DD57}#1.3#0"; "dsoframer.ocx"
Begin VB.Form FMainApplication
Caption = "VB6 Test Application for DsoFramer Control"
ClientHeight = 7290
ClientLeft = 165
ClientTop = 855
ClientWidth = 8430
LinkTopic = "Form1"
ScaleHeight = 486
ScaleMode = 3 'Pixel
ScaleWidth = 562
StartUpPosition = 3 'Windows Default
Begin DSOFramer.FramerControl oFramer
Height = 6375
Left = 120
TabIndex = 1
Top = 780
Width = 8235
_ExtentX = 14526
_ExtentY = 11245
BorderColor = -2147483632
BackColor = -2147483643
ForeColor = -2147483640
TitlebarColor = -2147483635
TitlebarTextColor= -2147483634
BorderStyle = 1
Titlebar = -1 'True
Toolbars = -1 'True
Menubar = -1 'True
End
Begin VB.Label lbCurrentFile
Caption = "Current File: [None]"
BeginProperty Font
Name = "Arial"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 900
TabIndex = 3
Top = 480
Width = 7335
End
Begin VB.Line lnTitle
BorderColor = &H80000014&
Index = 1
X1 = 56
X2 = 552
Y1 = 28
Y2 = 28
End
Begin VB.Line lnTitle
BorderColor = &H80000015&
BorderWidth = 2
Index = 0
X1 = 56
X2 = 552
Y1 = 28
Y2 = 28
End
Begin VB.Label lbAppTitle
Caption = "DsoFramer Test Client"
BeginProperty Font
Name = "Arial"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 840
TabIndex = 0
Top = 120
Width = 2355
End
Begin VB.Image Image1
Height = 600
Left = 120
Picture = "FTestApp.frx":0000
Top = 120
Width = 600
End
Begin VB.Label lbAppVersion
Alignment = 1 'Right Justify
Caption = "Version: 1.3"
BeginProperty Font
Name = "Arial"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 195
Left = 6450
TabIndex = 2
Top = 180
Width = 1800
End
Begin VB.Menu mnuFile
Caption = "&File"
Begin VB.Menu mnuFileNew
Caption = "&New..."
Shortcut = ^N
End
Begin VB.Menu mnuFileOpen
Caption = "&Open..."
Shortcut = ^O
End
Begin VB.Menu mnuFileWebOpen
Caption = "&Web Open..."
End
Begin VB.Menu mnuFileClose
Caption = "C&lose"
End
Begin VB.Menu mnuFileSep1
Caption = "-"
End
Begin VB.Menu mnuFileSave
Caption = "&Save"
Shortcut = ^S
End
Begin VB.Menu mnuFileSaveAs
Caption = "Save &As..."
End
Begin VB.Menu mnuFileSaveCopyAs
Caption = "Save Cop&y As..."
End
Begin VB.Menu mnuFileSaveWeb
Caption = "Save to We&b..."
End
Begin VB.Menu mnuFileSep2
Caption = "-"
End
Begin VB.Menu mnuFilePageSetup
Caption = "Page Set&up..."
End
Begin VB.Menu mnuFilePrintPreview
Caption = "Print Pre&view"
End
Begin VB.Menu mnuFilePrint
Caption = "P&rint (Default)"
Index = 0
End
Begin VB.Menu mnuFilePrint
Caption = "&Print..."
Index = 1
Shortcut = ^P
End
Begin VB.Menu mnuFilePrint
Caption = "Pri&nt to Target..."
Index = 2
End
Begin VB.Menu mnuFileSep3
Caption = "-"
End
Begin VB.Menu mnuFileProperties
Caption = "Propert&ies..."
End
Begin VB.Menu mnuFileSep4
Caption = "-"
End
Begin VB.Menu mnuFileQuit
Caption = "&Quit Application"
End
End
Begin VB.Menu mnuShow
Caption = "&Show"
Begin VB.Menu mnuShowCaption
Caption = "&Caption"
End
Begin VB.Menu mnuShowMenubar
Caption = "&Menubar"
End
Begin VB.Menu mnuShowToolbar
Caption = "&Toolbar"
End
Begin VB.Menu mnuShowSep1
Caption = "-"
End
Begin VB.Menu mnuBorderStyleOut
Caption = "&Border Style"
Begin VB.Menu mnuBorderStyle
Caption = "&None"
Index = 0
End
Begin VB.Menu mnuBorderStyle
Caption = "&Outline (default)"
Index = 1
End
Begin VB.Menu mnuBorderStyle
Caption = "3D &Frame"
Index = 2
End
Begin VB.Menu mnuBorderStyle
Caption = "3D Frame &Thin"
Index = 3
End
End
Begin VB.Menu mnuShowSep2
Caption = "-"
End
Begin VB.Menu mnuShowFileMenu
Caption = "&Disable File Menu Item"
Begin VB.Menu mnuDisableItem
Caption = "&New"
Index = 0
End
Begin VB.Menu mnuDisableItem
Caption = "&Open"
Index = 1
End
Begin VB.Menu mnuDisableItem
Caption = "&Close"
Index = 2
End
Begin VB.Menu mnuDisableItem
Caption = "&Save"
Index = 3
End
Begin VB.Menu mnuDisableItem
Caption = "Save &As"
Index = 4
End
Begin VB.Menu mnuDisableItem
Caption = "&Print"
Index = 5
End
Begin VB.Menu mnuDisableItem
Caption = "Page Set&up"
Index = 6
End
Begin VB.Menu mnuDisableItem
Caption = "Propert&ies"
Index = 7
End
Begin VB.Menu mnuDisableItem
Caption = "Print Pre&view"
Index = 8
End
End
Begin VB.Menu mnuShowSep3
Caption = "-"
End
Begin VB.Menu mnuCustomCaption
Caption = "&Custom Caption..."
End
End
End
Attribute VB_Name = "FMainApplication"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' FMainApplication
'
' VB6 Test Program for DsoFramer Control Sample KB 311765
'
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Main Form Events
'
Private Sub Form_Load()
' We'll use our our host name for the application
oFramer.HostName = "VB6TestApp"
' Setup the default items...
mnuShowMenubar.Checked = oFramer.Menubar
mnuShowToolbar.Checked = oFramer.Toolbars
mnuShowCaption.Checked = oFramer.Titlebar
mnuBorderStyle(oFramer.BorderStyle).Checked = True
Me.ScaleMode = 3 ' pixel
EnableItems False
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
' Check that document is closed before quit...
If mnuFileClose.Enabled Then
mnuFileClose_Click
Cancel = mnuFileClose.Enabled
End If
End Sub
Private Sub Form_Resize()
On Error Resume Next
' On resize, we scale the framer control to fit the form...
If (Me.ScaleWidth > 20) And (Me.ScaleHeight > 60) Then
oFramer.Move 10, 52, Me.ScaleWidth - 20, Me.ScaleHeight - 60
lnTitle(0).X2 = Me.ScaleWidth - 8
lnTitle(1).X2 = Me.ScaleWidth - 7
If (Me.ScaleWidth > 68) Then
lbCurrentFile.Width = Me.ScaleWidth - 68
End If
If (Me.ScaleWidth > 264) Then
lbAppVersion.Left = Me.ScaleWidth - 130
End If
End If
End Sub
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' File Menu Items
'
Private Sub mnuFileNew_Click()
' We just display the default New dialog to the user...
On Error Resume Next
oFramer.ShowDialog dsoDialogNew
If Err.Number Then
MsgBox "Unable to create new item." & vbCrLf & _
"(" & Str(Err.Number) & "): " & Err.Description, _
vbCritical, "Error"
Err.Clear
End If
End Sub
Private Sub mnuFileOpen_Click()
Dim vbPrompt As VbMsgBoxResult
On Error Resume Next
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -