📄 formdebug.frm
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Begin VB.Form FormDebug
BorderStyle = 0 'None
Caption = "编译信息"
ClientHeight = 1572
ClientLeft = 108
ClientTop = 108
ClientWidth = 5628
ControlBox = 0 'False
LinkTopic = "Form2"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1572
ScaleWidth = 5628
ShowInTaskbar = 0 'False
StartUpPosition = 1 'CenterOwner
Visible = 0 'False
Begin MSComctlLib.ListView LvDebug
Height = 1455
Left = 120
TabIndex = 0
Top = 120
Width = 5415
_ExtentX = 9546
_ExtentY = 2561
LabelWrap = -1 'True
HideSelection = -1 'True
FullRowSelect = -1 'True
GridLines = -1 'True
_Version = 393217
ForeColor = -2147483640
BackColor = -2147483643
BorderStyle = 1
Appearance = 1
NumItems = 0
End
End
Attribute VB_Name = "FormDebug"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Implements IWillDockToActiveBar
Private Sub Form_Resize()
LvDebug.Move 0, 0, Me.ScaleWidth, Me.ScaleHeight
End Sub
Private Function IWillDockToActiveBar_DockYourselfTo(ByVal ActiveBar As ActiveBar2LibraryCtl.IActiveBar2, Optional ByVal parmIsVisible As Boolean = True, Optional ByVal paramDockingarea As ActiveBar2LibraryCtl.DockingAreaTypes = 3&, Optional ByVal paramGrabHandleStyle As ActiveBar2LibraryCtl.GrabHandleStyles = 7&, Optional ByVal paramDockingOffset As Long = 0&) As ActiveBar2LibraryCtl.IBand
Dim b As ActiveBar2LibraryCtl.band
Dim t As ActiveBar2LibraryCtl.tool
Dim sBandName As String
On Error GoTo eh_IWillDockToActiveBar_DockYourselfTo
sBandName = DOCKABLEBANDPREFIXNAME + Me.Name
'这个可入坞的窗体带区并没有存在,所以创建一个
Set b = ActiveBar.Bands.Add(sBandName)
b.Caption = Me.Caption
b.DockingArea = paramDockingarea
b.DockLine = 0
b.DockingOffset = paramDockingOffset
b.GrabHandleStyle = paramGrabHandleStyle
b.AutoSizeForms = True
b.Type = ddBTNormal
b.DisplayMoreToolsButton = False
ABAddFlag ddBFSizer, b
b.Visible = parmIsVisible
'添加一个可入坞窗体按钮来使这个窗口入坞
Set t = b.Tools.Add(Me.hwnd, DOCKABLETOOLPREFIXNAME + Me.Name)
t.ControlType = ddTTForm
t.Caption = Me.Caption
Set t.Custom = Me
ex_IWillDockToActiveBar_DockYourselfTo:
Exit Function
eh_IWillDockToActiveBar_DockYourselfTo:
MsgBox "当入坞时在窗体“" + Me.Name + "”发生错误。"
Resume ex_IWillDockToActiveBar_DockYourselfTo
End Function
Private Sub ClearWindow()
LvDebug.ListItems.Clear
End Sub
Private Sub Form_Load()
LvDebug.View = lvwReport
LvDebug.ColumnHeaders.Add , , "错误文件", 1500
LvDebug.ColumnHeaders.Add , , "错误行号", 1000
LvDebug.ColumnHeaders.Add , , "错误语句", 3000
LvDebug.ColumnHeaders.Add , , "错误解释", 3000
End Sub
Private Sub ShowGrid()
LvDebug.GridLines = Not LvDebug.GridLines
End Sub
Private Sub LvDebug_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
If (Button = 2) Then _
fMainForm.ActiveBar.Bands("popupdebug").PopupMenu
End Sub
Public Sub MyPopupMenu(tool As ActiveBar2LibraryCtl.tool)
Select Case tool.Name
'调试窗口弹出菜单
Case "DebugClear":
ClearWindow
Case "DebugShowgrid"
ShowGrid
Case "DebugSaveResult"
SaveResult
End Select
End Sub
Private Sub SaveResult()
' MsgBox "待添加该功能", vbYes + vbInformation, "Dest3.0"
End Sub
Private Sub LvDebug_DblClick()
Dim i As Integer
If LvDebug.ListItems.count > 0 Then
If LvDebug.SelectedItem.Text <> "" Then
i = CInt(LvDebug.SelectedItem.SubItems(1))
'locate (i)
End If
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -