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

📄 form1.frm

📁 大量C源代码下载
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "最近最久未使用策略(LRU)"
   ClientHeight    =   5280
   ClientLeft      =   2835
   ClientTop       =   3000
   ClientWidth     =   5580
   ControlBox      =   0   'False
   LinkTopic       =   "Form1"
   ScaleHeight     =   5280
   ScaleWidth      =   5580
   Begin VB.TextBox Text2 
      BackColor       =   &H00C0E0FF&
      Height          =   270
      Index           =   4
      Left            =   2760
      TabIndex        =   32
      Text            =   "600"
      Top             =   3345
      Width           =   1095
   End
   Begin VB.TextBox Text2 
      BackColor       =   &H00C0E0FF&
      Height          =   270
      Index           =   3
      Left            =   2760
      TabIndex        =   31
      Text            =   "500"
      Top             =   2985
      Width           =   1095
   End
   Begin VB.TextBox Text2 
      BackColor       =   &H00C0E0FF&
      Height          =   270
      Index           =   2
      Left            =   2760
      TabIndex        =   30
      Text            =   "400"
      Top             =   2670
      Width           =   1095
   End
   Begin VB.TextBox Text2 
      BackColor       =   &H00C0E0FF&
      Height          =   270
      Index           =   1
      Left            =   2760
      TabIndex        =   29
      Text            =   "200"
      Top             =   2385
      Width           =   1095
   End
   Begin VB.TextBox Text6 
      BackColor       =   &H00C0FFC0&
      Height          =   270
      Index           =   4
      Left            =   1200
      Locked          =   -1  'True
      TabIndex        =   24
      Top             =   3360
      Width           =   1455
   End
   Begin VB.TextBox Text6 
      BackColor       =   &H00C0FFC0&
      Height          =   270
      Index           =   3
      Left            =   1200
      Locked          =   -1  'True
      TabIndex        =   23
      Top             =   3000
      Width           =   1455
   End
   Begin VB.TextBox Text6 
      BackColor       =   &H00C0FFC0&
      Height          =   270
      Index           =   2
      Left            =   1200
      Locked          =   -1  'True
      TabIndex        =   22
      Top             =   2670
      Width           =   1455
   End
   Begin VB.TextBox Text6 
      BackColor       =   &H00C0FFC0&
      Height          =   270
      Index           =   1
      Left            =   1200
      Locked          =   -1  'True
      TabIndex        =   21
      Top             =   2400
      Width           =   1455
   End
   Begin VB.TextBox Text13 
      Height          =   270
      Left            =   0
      TabIndex        =   20
      Top             =   4320
      Width           =   975
   End
   Begin VB.TextBox Text2 
      BackColor       =   &H00C0E0FF&
      Height          =   270
      Index           =   0
      Left            =   2760
      TabIndex        =   19
      Text            =   "300"
      Top             =   2040
      Width           =   1095
   End
   Begin VB.CommandButton Command3 
      Caption         =   "调入新页面(&N)"
      Height          =   375
      Left            =   2040
      TabIndex        =   16
      Top             =   4800
      Width           =   1335
   End
   Begin VB.TextBox Text1 
      BackColor       =   &H00C0E0FF&
      ForeColor       =   &H00000000&
      Height          =   270
      Left            =   2520
      TabIndex        =   15
      Top             =   4155
      Width           =   1335
   End
   Begin VB.Timer Timer1 
      Interval        =   1000
      Left            =   4200
      Top             =   3240
   End
   Begin VB.CommandButton Command2 
      Caption         =   "退出模拟器(&E)"
      Height          =   375
      Left            =   3480
      TabIndex        =   3
      Top             =   4800
      Width           =   1425
   End
   Begin VB.TextBox Text11 
      BackColor       =   &H00C0E0FF&
      Height          =   270
      Left            =   2520
      TabIndex        =   2
      Top             =   4455
      Width           =   1335
   End
   Begin VB.CommandButton Command1 
      Caption         =   "进行访问(&R)"
      Default         =   -1  'True
      Height          =   375
      Left            =   480
      TabIndex        =   1
      Top             =   4800
      Width           =   1425
   End
   Begin VB.TextBox Text6 
      BackColor       =   &H00C0FFC0&
      Height          =   270
      Index           =   0
      Left            =   1185
      Locked          =   -1  'True
      TabIndex        =   0
      Top             =   2070
      Width           =   1455
   End
   Begin VB.Label Label5 
      BackStyle       =   0  'Transparent
      Caption         =   "2000"
      ForeColor       =   &H00FF0000&
      Height          =   255
      Left            =   4995
      TabIndex        =   28
      Top             =   4155
      Width           =   495
   End
   Begin VB.Label Label6 
      BackStyle       =   0  'Transparent
      Caption         =   "总内存:"
      ForeColor       =   &H00FF0000&
      Height          =   255
      Left            =   4230
      TabIndex        =   27
      Top             =   4155
      Width           =   735
   End
   Begin VB.Label Label7 
      BackStyle       =   0  'Transparent
      Caption         =   "剩余量:"
      ForeColor       =   &H00FF0000&
      Height          =   255
      Left            =   4230
      TabIndex        =   26
      Top             =   4455
      Width           =   735
   End
   Begin VB.Label Label8 
      BackStyle       =   0  'Transparent
      Height          =   255
      Left            =   4965
      TabIndex        =   25
      Top             =   4440
      Width           =   495
   End
   Begin VB.Line Line8 
      X1              =   1200
      X2              =   3960
      Y1              =   3645
      Y2              =   3645
   End
   Begin VB.Line Line7 
      X1              =   1200
      X2              =   3960
      Y1              =   3300
      Y2              =   3300
   End
   Begin VB.Line Line6 
      X1              =   1200
      X2              =   3960
      Y1              =   2955
      Y2              =   2955
   End
   Begin VB.Line Line5 
      X1              =   1185
      X2              =   3960
      Y1              =   2640
      Y2              =   2655
   End
   Begin VB.Line Line4 
      X1              =   1200
      X2              =   3960
      Y1              =   2340
      Y2              =   2340
   End
   Begin VB.Line Line3 
      X1              =   1200
      X2              =   3960
      Y1              =   2040
      Y2              =   2040
   End
   Begin VB.Label Label18 
      BackStyle       =   0  'Transparent
      Caption         =   "计时器"
      ForeColor       =   &H00FF0000&
      Height          =   255
      Left            =   1200
      TabIndex        =   18
      Top             =   1800
      Width           =   1215
   End
   Begin VB.Label Label17 
      BackStyle       =   0  'Transparent
      Caption         =   "内存占用大小 "
      ForeColor       =   &H00FF0000&
      Height          =   255
      Left            =   2775
      TabIndex        =   17
      Top             =   1800
      Width           =   1095
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "调入新页面大小"
      ForeColor       =   &H00FF0000&
      Height          =   255
      Left            =   1200
      TabIndex        =   14
      Top             =   4200
      Width           =   1335
   End
   Begin VB.Label Label3 
      BackColor       =   &H00FF0000&
      BackStyle       =   0  'Transparent
      Caption         =   "访问页面(1~5)"
      ForeColor       =   &H00FF0000&
      Height          =   255
      Left            =   1320
      TabIndex        =   13
      Top             =   4485
      Width           =   1335
   End
   Begin VB.Label Label16 
      BackStyle       =   0  'Transparent
      Caption         =   "Copyright(c) by 104-stdio"
      Height          =   255
      Left            =   1440
      TabIndex        =   12
      Top             =   60
      Width           =   2295
   End
   Begin VB.Label Label15 
      BackStyle       =   0  'Transparent
      Caption         =   "页面5"
      Height          =   255
      Left            =   645
      TabIndex        =   11
      Top             =   2070
      Width           =   495
   End
   Begin VB.Label Label14 
      BackStyle       =   0  'Transparent
      Caption         =   "页面4"
      Height          =   255
      Left            =   645
      TabIndex        =   10
      Top             =   2385
      Width           =   495
   End
   Begin VB.Label Label13 
      BackStyle       =   0  'Transparent
      Caption         =   "页面3"
      Height          =   255
      Left            =   645
      TabIndex        =   9
      Top             =   2685
      Width           =   495
   End
   Begin VB.Label Label12 
      BackStyle       =   0  'Transparent
      Caption         =   "页面2"
      Height          =   255
      Left            =   645
      TabIndex        =   8
      Top             =   3030
      Width           =   495
   End
   Begin VB.Label Label11 
      BackStyle       =   0  'Transparent
      Caption         =   "页面1"
      Height          =   255
      Left            =   645
      TabIndex        =   7
      Top             =   3360
      Width           =   495
   End
   Begin VB.Label Label10 
      BackColor       =   &H00C0FFC0&
      Height          =   255
      Left            =   4950
      TabIndex        =   6
      Top             =   3825
      Width           =   615
   End
   Begin VB.Label Label9 
      BackStyle       =   0  'Transparent
      Caption         =   "作业页:"
      ForeColor       =   &H00FF0000&
      Height          =   255
      Left            =   4230
      TabIndex        =   5
      Top             =   3855
      Width           =   735
   End
   Begin VB.Label Label4 
      BackStyle       =   0  'Transparent
      Caption         =   "虚拟内存"
      ForeColor       =   &H00FF0000&
      Height          =   735
      Left            =   2520
      TabIndex        =   4
      Top             =   780
      Width           =   255
   End
   Begin VB.Line Line2 
      BorderColor     =   &H80000001&
      BorderWidth     =   3
      X1              =   3960
      X2              =   3960
      Y1              =   510
      Y2              =   3990
   End
   Begin VB.Line Line1 
      BorderColor     =   &H80000001&
      BorderWidth     =   3
      X1              =   1155
      X2              =   1155
      Y1              =   480
      Y2              =   3960
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public sum As Integer
Public a, b, c, d, e As Integer
Dim try(0 To 4) As Integer
Public s As Integer

Private Sub Command1_Click()
If Text11.Text <> "" And Val(Text11.Text) >= 1 And Val(Text11.Text) <= 5 Then
If Text11.Text = 1 Then
    a = 0
    ElseIf Text11.Text = 2 Then
     b = 0
      ElseIf Text11.Text = 3 Then
        c = 0
         ElseIf Text11.Text = 4 Then
          d = 0
            ElseIf Text11.Text = 5 Then
             e = 0
             End If
    Else
    MsgBox "请输入要进行访问的作业序列号!"
             End If
End Sub

Private Sub Command2_Click()
End
End Sub

Private Sub Command3_Click()
Dim max As Integer
Dim i As Integer
max = Val(Text6(0).Text)
  For i = 1 To 4
   If Val(Text6(i).Text) > max Then
     max = Val(Text6(i).Text)
     End If
   Next i
     Text13.Text = max


   If sum < Val(Text11.Text) Then
         s = sum
         For i = 0 To 4
          If Val(Text6(i).Text) = max Then
            try(i) = 1
            s = s + Val(Text2(i).Text)
            End If
            Next i
          s = sum
         If s >= Val(Text11.Text) Then
            For i = 0 To 4
             If try(i) = 1 Then
                if
            
          
       
       
       
       
       
       
       
       
       
        End If

         
                    
 
 
 
End Sub

Private Sub Form_Activate()
Text11.SetFocus
Label8.Caption = 0
s = 0
End Sub

Private Sub Form_Load()
sum = 0
End Sub

Private Sub Timer1_Timer()
a = a + 1
b = b + 1
c = c + 1
d = d + 1
e = e + 1
Text6(4).Text = a
Text6(3).Text = b
Text6(2).Text = c
Text6(1).Text = d
Text6(0).Text = e
End Sub

⌨️ 快捷键说明

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