home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form Form1
- Caption = "Memory Status"
- ClientHeight = 4605
- ClientLeft = 60
- ClientTop = 330
- ClientWidth = 4935
- LinkTopic = "Form1"
- ScaleHeight = 4605
- ScaleWidth = 4935
- StartUpPosition = 3 'Windows Default
- Begin VB.CommandButton Command1
- Caption = "Memory Status"
- Height = 615
- Left = 960
- TabIndex = 14
- Top = 3840
- Width = 2895
- End
- Begin VB.Label Label1
- Caption = "Free Virtual Bytes:"
- Height = 255
- Index = 13
- Left = 120
- TabIndex = 13
- Top = 3120
- Width = 2175
- End
- Begin VB.Label Label1
- Caption = "Total Virtual Bytes:"
- Height = 255
- Index = 12
- Left = 120
- TabIndex = 12
- Top = 2640
- Width = 2175
- End
- Begin VB.Label Label1
- Caption = "Free Byte of Paging File:"
- Height = 255
- Index = 11
- Left = 120
- TabIndex = 11
- Top = 2160
- Width = 2175
- End
- Begin VB.Label Label1
- Caption = "Page File Bytes:"
- Height = 255
- Index = 10
- Left = 120
- TabIndex = 10
- Top = 1680
- Width = 2175
- End
- Begin VB.Label Label1
- Caption = "Available Physical Bytes:"
- Height = 255
- Index = 9
- Left = 120
- TabIndex = 9
- Top = 1200
- Width = 2175
- End
- Begin VB.Label Label1
- Caption = "Total Physical Bytes:"
- Height = 255
- Index = 8
- Left = 120
- TabIndex = 8
- Top = 720
- Width = 2175
- End
- Begin VB.Label Label1
- Caption = "Percent of Memory in Use:"
- Height = 255
- Index = 7
- Left = 120
- TabIndex = 7
- Top = 240
- Width = 2175
- End
- Begin VB.Label Label1
- Height = 255
- Index = 6
- Left = 2640
- TabIndex = 6
- Top = 3120
- Width = 2175
- End
- Begin VB.Label Label1
- Height = 255
- Index = 5
- Left = 2640
- TabIndex = 5
- Top = 2640
- Width = 2175
- End
- Begin VB.Label Label1
- Height = 255
- Index = 4
- Left = 2640
- TabIndex = 4
- Top = 2160
- Width = 2175
- End
- Begin VB.Label Label1
- Height = 255
- Index = 3
- Left = 2640
- TabIndex = 3
- Top = 1680
- Width = 2175
- End
- Begin VB.Label Label1
- Height = 255
- Index = 2
- Left = 2640
- TabIndex = 2
- Top = 1200
- Width = 2175
- End
- Begin VB.Label Label1
- Height = 255
- Index = 1
- Left = 2640
- TabIndex = 1
- Top = 720
- Width = 2175
- End
- Begin VB.Label Label1
- Height = 255
- Index = 0
- Left = 2640
- TabIndex = 0
- Top = 240
- Width = 2175
- End
- Attribute VB_Name = "Form1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Option Explicit
- Private Declare Sub GlobalMemoryStatus Lib "kernel32" (lpBuffer As MEMORYSTATUS)
- Private Type MEMORYSTATUS
- dwLength As Long
- dwMemoryLoad As Long
- dwTotalPhys As Long
- dwAvailPhys As Long
- dwTotalPageFile As Long
- dwAvailPageFile As Long
- dwTotalVirtual As Long
- dwAvailVirtual As Long
- End Type
- Private Sub Command1_Click()
- Dim memStat As MEMORYSTATUS
- memStat.dwLength = Len(memStat)
- Call GlobalMemoryStatus(memStat)
- Label1(0).Caption = memStat.dwMemoryLoad
- Label1(1).Caption = memStat.dwTotalPhys
- Label1(2).Caption = memStat.dwAvailPhys
- Label1(3).Caption = memStat.dwTotalPageFile
- Label1(4).Caption = memStat.dwAvailPageFile
- Label1(5).Caption = memStat.dwTotalVirtual
- Label1(6).Caption = memStat.dwAvailVirtual
- End Sub
-