frmbrowser.frm
来自「OA编程 源代码」· FRM 代码 · 共 471 行 · 第 1/2 页
FRM
471 行
ButtonWidth = 1667
ButtonHeight = 582
AllowCustomize = 0 'False
Wrappable = 0 'False
Style = 1
TextAlignment = 1
ImageList = "ImaLstweb"
_Version = 393216
BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
NumButtons = 12
BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
Object.Visible = 0 'False
Caption = "打 印"
Key = "cmdprint"
Object.ToolTipText = "打印页面"
ImageIndex = 16
EndProperty
BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
Object.Visible = 0 'False
Style = 3
EndProperty
BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "前一页"
Key = "cmdprevious"
Description = "锁定列"
Object.ToolTipText = "浏览前一页"
ImageIndex = 14
EndProperty
BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "后一页"
Key = "cmdnext"
Object.ToolTipText = "浏览后一页"
ImageIndex = 15
EndProperty
BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "停 止"
Key = "cmdstop"
Object.ToolTipText = "停止浏览"
ImageIndex = 12
EndProperty
BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "刷 新"
Key = "cmdrefresh"
Object.ToolTipText = "刷 新"
ImageIndex = 20
EndProperty
BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "主 页"
Key = "cmdhome"
Object.ToolTipText = "主 页"
ImageIndex = 19
EndProperty
BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628}
Object.Visible = 0 'False
Caption = "搜 索"
Key = "search"
Object.ToolTipText = "进入搜索引擎"
ImageIndex = 21
EndProperty
BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628}
Object.Visible = 0 'False
Style = 3
EndProperty
BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "帮助"
Key = "help"
Object.ToolTipText = "帮助信息"
ImageIndex = 17
Style = 5
BeginProperty ButtonMenus {66833FEC-8583-11D1-B16A-00C0F0283628}
NumButtonMenus = 3
BeginProperty ButtonMenu1 {66833FEE-8583-11D1-B16A-00C0F0283628}
Text = "PKPM主页"
EndProperty
BeginProperty ButtonMenu2 {66833FEE-8583-11D1-B16A-00C0F0283628}
Text = "发信咨询"
EndProperty
BeginProperty ButtonMenu3 {66833FEE-8583-11D1-B16A-00C0F0283628}
Text = "在线帮助"
EndProperty
EndProperty
EndProperty
BeginProperty Button12 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "关 闭"
Key = "cmdclose"
Object.ToolTipText = "关 闭"
ImageIndex = 18
EndProperty
EndProperty
OLEDropMode = 1
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "查找条件:"
Height = 180
Left = 10152
TabIndex = 6
Top = 1248
Width = 816
End
End
End
Begin VB.Label Label1
Caption = "Programmed by Mary Elizabeth Laub"
Height = 255
Left = 2040
TabIndex = 2
Top = 8280
Width = 5175
End
End
Attribute VB_Name = "frmBrowser"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdBack()
On Error Resume Next
WebBrowser.GoBack
txtURL.Text = ""
End Sub
Private Sub cmdnext()
On Error Resume Next
WebBrowser.GoForward
txtURL.Text = ""
End Sub
Private Sub CmdGo()
If Len(txtURL.Text) > 0 Then
WebBrowser.Navigate txtURL.Text
Else
WebBrowser.Stop
MsgBox "Please Enter a valid URL.", vbOKOnly, "Invalid URL"
txtURL.SetFocus
End If
End Sub
Private Sub CmdHome()
Dim m_Rs As New ADODB.Recordset
Dim MySQL As String
On Error Resume Next
MySQL = "select * from webset "
Set m_Rs = g_Cnn.Execute(MySQL)
If m_Rs.RecordCount > 0 Then
For i = 0 To m_Rs.RecordCount - 1
'If m_Rs("LastLogon") = True Then
WebBrowser.Navigate "http://" & m_Rs("Sevname").Value & "/" & m_Rs("WebName").Value
txtURL.Text = "http://" & m_Rs("Sevname").Value & "/" & m_Rs("WebName").Value
'End If
m_Rs.MoveNext
Next i
m_Rs.Close
End If
'WebBrowser.Navigate "http://10.13.103.13/demooa"
'txtURL.Text = "http://10.13.103.13/demooa"
End Sub
Private Sub Form_Load()
On Error GoTo webErr
Call CnnAccess
CmdHome
Call LoadSkin(Me)
Exit Sub
webErr:
Me.MousePointer = 0
Call g_ErrorMessage.ErrMessage
End Sub
Private Sub Form_Resize()
If Me.WindowState <> 1 Then
WebBrowser.Width = Me.Width - 100
WebBrowser.Height = Me.Height - CoolBar1.Height - CoolBar2.Height - 400
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
Set g_Cnn = Nothing
End Sub
Private Sub Toolbar_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Button.Key
Case "cmdprevious"
Me.MousePointer = 11
cmdBack
Me.MousePointer = 0
Case "cmdnext"
Me.MousePointer = 11
cmdnext
Me.MousePointer = 0
Case "cmdstop"
Case "cmdrefresh"
Me.MousePointer = 11
CmdGo
Me.MousePointer = 0
Case "cmdhome"
Me.MousePointer = 11
CmdHome
Me.MousePointer = 0
Case "cmdclose"
Unload Me
End Select
End Sub
Private Sub txtURL_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case vbKeyReturn
CmdGo
End Select
End Sub
Private Sub txtURL_KeyPress(KeyAscii As Integer)
On Error Resume Next
If KeyAscii = vbKeyReturn Then
WebBrowser.Navigate txtURL.Text
End If
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?