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

📄 frmeditlist.frm

📁 JK Proxy Project - Version 0.1 ------------------------------ This was going to be a proxy serve
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmEditList 
   Caption         =   "EditList"
   ClientHeight    =   5310
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   7290
   LinkTopic       =   "Form1"
   ScaleHeight     =   354
   ScaleMode       =   3  'Pixel
   ScaleWidth      =   486
   StartUpPosition =   3  'Windows Default
   Begin VB.CommandButton cmdCancel 
      Caption         =   "Cancel"
      Height          =   315
      Left            =   6000
      TabIndex        =   2
      Top             =   4080
      Width           =   1095
   End
   Begin VB.CommandButton cmdSave 
      Caption         =   "Save"
      Height          =   315
      Left            =   4800
      TabIndex        =   1
      Top             =   4080
      Width           =   1095
   End
   Begin VB.TextBox txtList 
      Height          =   3495
      Left            =   0
      MultiLine       =   -1  'True
      ScrollBars      =   2  'Vertical
      TabIndex        =   0
      Top             =   0
      Width           =   7095
   End
End
Attribute VB_Name = "frmEditList"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private strOpenFile As String  ' stores name of opend file

Public Sub LoadFile(strFile As String)
' load file to textbox
Dim strTemp As String, FF As Integer

strTemp = Space(FileLen(strFile))
FF = FreeFile
Open strFile For Binary As #FF
  Get #FF, , strTemp
Close #FF

txtList = strTemp

' set caption
Me.Caption = "Edit list - " + ExtractFileName(strFile)
' save filename
strOpenFile = strFile
End Sub

Private Sub cmdCancel_Click()
' discard all changes
Unload Me
End Sub

Private Sub cmdSave_Click()
' save file and close
Dim FF As Integer

On Error Resume Next
' kill file first
Kill strOpenFile
FF = FreeFile
Open strOpenFile For Binary As #FF
  Put #FF, , txtList.Text
Close #FF

NeedRestart
Unload Me
End Sub

Private Sub Form_Resize()
cmdCancel.Left = Me.ScaleWidth - cmdCancel.Width - 8
cmdSave.Left = cmdCancel.Left - cmdSave.Width - 8
cmdCancel.Top = Me.ScaleHeight - 26
cmdSave.Top = cmdCancel.Top

txtList.Width = Me.ScaleWidth
txtList.Height = Me.ScaleHeight - 32
End Sub

⌨️ 快捷键说明

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