⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmmain.frm

📁 这是一个电子书制作生成的工具源码,十分有价值,而且运用了加密解密的技术
💻 FRM
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Object = "{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}#1.1#0"; "shdocvw.dll"
Begin VB.Form frmmain 
   ClientHeight    =   4365
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   6600
   Icon            =   "frmmain.frx":0000
   LinkTopic       =   "Form1"
   ScaleHeight     =   4365
   ScaleWidth      =   6600
   StartUpPosition =   2  '屏幕中心
   WindowState     =   2  'Maximized
   Begin SHDocVwCtl.WebBrowser WebView 
      Height          =   2130
      Left            =   0
      TabIndex        =   2
      Top             =   840
      Width           =   2850
      ExtentX         =   5027
      ExtentY         =   3757
      ViewMode        =   0
      Offline         =   0
      Silent          =   0
      RegisterAsBrowser=   0
      RegisterAsDropTarget=   1
      AutoArrange     =   0   'False
      NoClientEdge    =   0   'False
      AlignLeft       =   0   'False
      NoWebView       =   0   'False
      HideFileNames   =   0   'False
      SingleClick     =   0   'False
      SingleSelection =   0   'False
      NoFolders       =   0   'False
      Transparent     =   0   'False
      ViewID          =   "{0057D0E0-3573-11CF-AE69-08002B2E1262}"
      Location        =   "http:///"
   End
   Begin MSComctlLib.ImageList ImageList1 
      Left            =   6015
      Top             =   3405
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   28
      ImageHeight     =   28
      MaskColor       =   16777215
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
         NumListImages   =   9
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmmain.frx":08CA
            Key             =   ""
         EndProperty
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmmain.frx":108A
            Key             =   ""
         EndProperty
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmmain.frx":184A
            Key             =   ""
         EndProperty
         BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmmain.frx":200A
            Key             =   ""
         EndProperty
         BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmmain.frx":27CA
            Key             =   ""
         EndProperty
         BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmmain.frx":2F8A
            Key             =   ""
         EndProperty
         BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmmain.frx":374A
            Key             =   ""
         EndProperty
         BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmmain.frx":3F0A
            Key             =   ""
         EndProperty
         BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmmain.frx":46CA
            Key             =   ""
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.Toolbar tBar1 
      Align           =   1  'Align Top
      Height          =   735
      Left            =   0
      TabIndex        =   1
      Top             =   0
      Width           =   6600
      _ExtentX        =   11642
      _ExtentY        =   1296
      ButtonWidth     =   926
      ButtonHeight    =   1244
      AllowCustomize  =   0   'False
      Wrappable       =   0   'False
      Appearance      =   1
      Style           =   1
      ImageList       =   "ImageList1"
      _Version        =   393216
      BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
         NumButtons      =   10
         BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "后退"
            Key             =   "M_BK"
            Object.ToolTipText     =   "Go Back"
            ImageIndex      =   1
         EndProperty
         BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "前进"
            Key             =   "M_FW"
            Object.ToolTipText     =   "Go Forward"
            ImageIndex      =   2
         EndProperty
         BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
         BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "停止"
            Key             =   "M_STP"
            Object.ToolTipText     =   "Stop"
            ImageIndex      =   3
         EndProperty
         BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "主页"
            Key             =   "M_HOME"
            Object.ToolTipText     =   "Go Home"
            ImageIndex      =   4
         EndProperty
         BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
         BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "查找"
            Key             =   "M_FIND"
            Object.ToolTipText     =   "Find"
            ImageIndex      =   5
         EndProperty
         BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "打印"
            Key             =   "M_PRT"
            Object.ToolTipText     =   "Print"
            ImageIndex      =   6
         EndProperty
         BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "关于"
            Key             =   "M_IFO"
            Object.ToolTipText     =   "Info"
            ImageIndex      =   7
         EndProperty
         BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "退出"
            Key             =   "M_EX"
            Object.ToolTipText     =   "Exit"
            ImageIndex      =   9
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.StatusBar Stb 
      Align           =   2  'Align Bottom
      Height          =   375
      Left            =   0
      TabIndex        =   0
      Top             =   3990
      Width           =   6600
      _ExtentX        =   11642
      _ExtentY        =   661
      _Version        =   393216
      BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
         NumPanels       =   1
         BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            AutoSize        =   1
            Object.Width           =   11113
         EndProperty
      EndProperty
   End
   Begin VB.Line Line1 
      BorderColor     =   &H00808080&
      Index           =   1
      X1              =   0
      X2              =   795
      Y1              =   795
      Y2              =   795
   End
   Begin VB.Line Line1 
      BorderColor     =   &H00FFFFFF&
      Index           =   0
      X1              =   0
      X2              =   795
      Y1              =   810
      Y2              =   810
   End
End
Attribute VB_Name = "frmmain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
' Ebook Viewer
' Coded and Designed by Ben Jones
' Created on 28/10/03
' Email dreamvb@yahoo.com or vbdream2k@yahoo.com

Dim HomePage As String ' Holds the ebooks default home page

Private Function FixPath(lzPath As String) As String
    ' Fixes a path by adding a back slash if required
    '如果需要 确定路径增加一个反斜杠
    If Right$(lzPath, 1) = "\" Then FixPath = lzPath Else FixPath = lzPath & "\"
End Function

Private Sub Form_Load()
On Error Resume Next
Dim StrB As String, StrV As Variant

    StrB = StrConv(LoadResData(101, "CUSTOM"), vbUnicode) ' Losd in the ebooks info
    StrV = Split(StrB, ":")
   
    frmmain.Caption = StrV(0)
    
    If Len(StrV(2)) = 0 Then
'        MsgBox "Unable to locate the main main index page.", vbCritical, "Error Loading Home Page"
        MsgBox "不能定位到主页。", vbCritical, "加载主页错误"
        Exit Sub ' There was an error finding the home page to stop here/那儿有发现主页错误,到此为止
    End If
    
    HomePage = "RES://" & FixPath(App.Path) & App.EXEName & ".exe/" & StrV(2) ' Setup up home page location
    WebView.Navigate HomePage ' Move to the default home page/转到默认主页
    
    StrB = "" ' Clear var/清除变量
    Erase StrV ' Erase StrV array/擦除StrV数组
    
End Sub

Private Sub Form_Resize()
On Error Resume Next
    ' Code below used to resize the controls on the form/下面的代码使用在窗体上调整控件大小
    Line1(0).X2 = frmmain.ScaleWidth
    Line1(1).X2 = frmmain.ScaleWidth
    WebView.Width = frmmain.ScaleWidth - WebView.Left
    WebView.Height = (frmmain.ScaleHeight - WebView.Top) - Stb.Height
    If Err Then Err.Clear
    
End Sub

Private Sub Form_Unload(Cancel As Integer)
    Set frmmain = Nothing ' Release form from memory/从内存中释放窗体
    End ' End the program/程序结束
End Sub

Private Sub tBar1_ButtonClick(ByVal Button As MSComctlLib.Button)
On Error Resume Next

    Select Case Button.Key
        Case "M_BK"
            WebView.GoBack ' Made the broswer go back a page
        Case "M_FW"
            WebView.GoForward ' Made the broswer go forward a page
        Case "M_STP"
            WebView.Stop ' Stop current loading of a page
        Case "M_HOME"
            WebView.Navigate HomePage ' Move to home page
        Case "M_FIND"
            WebView.SetFocus ' Set focus on the web control
            SendKeys "^f" ' Send key action to show find dialog
        Case "M_PRT"
            WebView.SetFocus ' Set focus on the web control
            SendKeys "^p"   ' Send key action to show pring dialog
        Case "M_IFO"
            frmAbout.Show vbModal, frmmain ' Show the ebooks about box
        Case "M_EX"
            HomePage = "" ' Clear home page buffer
            Unload frmmain ' Unload the form
            End ' End the program
    End Select
    
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -