home *** CD-ROM | disk | FTP | other *** search
/ Hot Shareware 32 / hot34.iso / ficheros / LVB / T2W32523.ZIP / _MEM.FRM < prev    next >
Text File  |  1998-04-07  |  7KB  |  252 lines

  1. VERSION 5.00
  2. Object = "{0BA686C6-F7D3-101A-993E-0000C0EF6F5E}#1.0#0"; "THREED32.OCX"
  3. Begin VB.Form frmMem 
  4.    BorderStyle     =   4  'Fixed ToolWindow
  5.    Caption         =   "Memory status"
  6.    ClientHeight    =   4845
  7.    ClientLeft      =   1890
  8.    ClientTop       =   3270
  9.    ClientWidth     =   7485
  10.    MaxButton       =   0   'False
  11.    MDIChild        =   -1  'True
  12.    PaletteMode     =   1  'UseZOrder
  13.    ScaleHeight     =   4845
  14.    ScaleWidth      =   7485
  15.    ShowInTaskbar   =   0   'False
  16.    Begin Threed.SSPanel SSPanel1 
  17.       Align           =   1  'Align Top
  18.       Height          =   480
  19.       Left            =   0
  20.       TabIndex        =   1
  21.       Top             =   0
  22.       Width           =   7485
  23.       _Version        =   65536
  24.       _ExtentX        =   13203
  25.       _ExtentY        =   847
  26.       _StockProps     =   15
  27.       ForeColor       =   -2147483640
  28.       BackColor       =   12632256
  29.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  30.          Name            =   "MS Sans Serif"
  31.          Size            =   8.25
  32.          Charset         =   0
  33.          Weight          =   400
  34.          Underline       =   0   'False
  35.          Italic          =   0   'False
  36.          Strikethrough   =   0   'False
  37.       EndProperty
  38.       Begin VB.ComboBox cmb_Function 
  39.          Height          =   315
  40.          Left            =   1365
  41.          TabIndex        =   2
  42.          Top             =   90
  43.          Width           =   4785
  44.       End
  45.       Begin Threed.SSCommand cmdNP 
  46.          Height          =   300
  47.          Index           =   1
  48.          Left            =   7140
  49.          TabIndex        =   6
  50.          Top             =   90
  51.          Width           =   255
  52.          _Version        =   65536
  53.          _ExtentX        =   450
  54.          _ExtentY        =   529
  55.          _StockProps     =   78
  56.          Caption         =   ">"
  57.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  58.             Name            =   "MS Sans Serif"
  59.             Size            =   8.25
  60.             Charset         =   0
  61.             Weight          =   400
  62.             Underline       =   0   'False
  63.             Italic          =   0   'False
  64.             Strikethrough   =   0   'False
  65.          EndProperty
  66.          BevelWidth      =   1
  67.          Font3D          =   3
  68.          RoundedCorners  =   0   'False
  69.          Outline         =   0   'False
  70.       End
  71.       Begin Threed.SSCommand cmdNP 
  72.          Height          =   300
  73.          Index           =   0
  74.          Left            =   6300
  75.          TabIndex        =   5
  76.          Top             =   90
  77.          Width           =   255
  78.          _Version        =   65536
  79.          _ExtentX        =   450
  80.          _ExtentY        =   529
  81.          _StockProps     =   78
  82.          Caption         =   "<"
  83.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  84.             Name            =   "MS Sans Serif"
  85.             Size            =   8.25
  86.             Charset         =   0
  87.             Weight          =   400
  88.             Underline       =   0   'False
  89.             Italic          =   0   'False
  90.             Strikethrough   =   0   'False
  91.          EndProperty
  92.          BevelWidth      =   1
  93.          Font3D          =   3
  94.          RoundedCorners  =   0   'False
  95.          Outline         =   0   'False
  96.       End
  97.       Begin Threed.SSCommand SSCommand1 
  98.          Default         =   -1  'True
  99.          Height          =   300
  100.          Left            =   6615
  101.          TabIndex        =   3
  102.          Top             =   90
  103.          Width           =   465
  104.          _Version        =   65536
  105.          _ExtentX        =   820
  106.          _ExtentY        =   529
  107.          _StockProps     =   78
  108.          Caption         =   "&Go"
  109.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  110.             Name            =   "MS Sans Serif"
  111.             Size            =   8.25
  112.             Charset         =   0
  113.             Weight          =   400
  114.             Underline       =   0   'False
  115.             Italic          =   0   'False
  116.             Strikethrough   =   0   'False
  117.          EndProperty
  118.          BevelWidth      =   1
  119.          RoundedCorners  =   0   'False
  120.          Outline         =   0   'False
  121.       End
  122.       Begin VB.Label Label2 
  123.          Caption         =   "&Select a function"
  124.          Height          =   255
  125.          Left            =   90
  126.          TabIndex        =   4
  127.          Top             =   120
  128.          Width           =   1275
  129.       End
  130.    End
  131.    Begin VB.Label lbl_Result 
  132.       Appearance      =   0  'Flat
  133.       BackColor       =   &H80000005&
  134.       BackStyle       =   0  'Transparent
  135.       ForeColor       =   &H80000008&
  136.       Height          =   4110
  137.       Left            =   90
  138.       TabIndex        =   0
  139.       Top             =   630
  140.       Width           =   7305
  141.    End
  142. End
  143. Attribute VB_Name = "frmMem"
  144. Attribute VB_GlobalNameSpace = False
  145. Attribute VB_Creatable = False
  146. Attribute VB_PredeclaredId = True
  147. Attribute VB_Exposed = False
  148. Option Explicit
  149. Option Base 1
  150.  
  151. Private Const Iteration = 250
  152.  
  153. Dim IsLoaded         As Integer
  154.  
  155. Dim TimerStartOk     As Integer
  156. Dim TimerCloseOk     As Integer
  157.  
  158. Dim TimerHandle      As Integer
  159. Dim TimerValue       As Long
  160.  
  161. Private Sub cmdNP_Click(Index As Integer)
  162.  
  163.    Call sub_NextPrev(cmb_Function, Index)
  164.  
  165. End Sub
  166.  
  167.  
  168. Private Sub cmb_Function_Click()
  169.    
  170.    If (IsLoaded = False) Then Exit Sub
  171.    
  172.    Call cDisableFI(mdiT2W.Picture1)
  173.    
  174.    lbl_Result = ""
  175.    
  176.    DoEvents
  177.    
  178.    Select Case cmb_Function.ListIndex
  179.       Case 0
  180.          Call TestMemoryStatus
  181.    End Select
  182.  
  183.    DoEvents
  184.    Call cEnableFI(mdiT2W.Picture1)
  185.    
  186. End Sub
  187.  
  188.  
  189. Private Sub Form_Activate()
  190.  
  191.    mdiT2W.Label2.Caption = cInsertBlocks(mdiT2W.Label2.Tag, "" & Iteration)
  192.  
  193. End Sub
  194.  
  195. Private Sub Form_Load()
  196.  
  197.    IsLoaded = False
  198.    
  199.    Show
  200.  
  201.    Call sub_Load_Combo(cmb_Function, T2WDirInst + "_mem.t2w")
  202.    
  203.    IsLoaded = True
  204.    
  205. End Sub
  206.  
  207. Private Sub SSCommand1_Click()
  208.    
  209.    Call cmb_Function_Click
  210.    
  211. End Sub
  212.  
  213. Private Sub TestMemoryStatus()
  214.  
  215.    Dim intResult        As Integer
  216.    Dim strResult        As String
  217.    Dim strDisplay       As String
  218.    
  219.    Dim i                As Integer
  220.    
  221.    Dim MSS              As tagMEMORYSTATUS
  222.    
  223.    strResult = ""
  224.    strDisplay = ""
  225.    
  226.    Call cMemoryStatus(MSS)
  227.    
  228.    strDisplay = strDisplay & "dwMemoryLoad = " & MSS.dwMemoryLoad & vbCrLf
  229.    strDisplay = strDisplay & "dwTotalPhys = " & MSS.dwTotalPhys & vbCrLf
  230.    strDisplay = strDisplay & "dwAvailPhys = " & MSS.dwAvailPhys & vbCrLf
  231.    strDisplay = strDisplay & "dwTotalPageFile = " & MSS.dwTotalPageFile & vbCrLf
  232.    strDisplay = strDisplay & "dwAvailPageFile = " & MSS.dwAvailPageFile & vbCrLf
  233.    strDisplay = strDisplay & "dwTotalVirtual = " & MSS.dwTotalVirtual & vbCrLf
  234.    strDisplay = strDisplay & "dwAvailVirtual = " & MSS.dwAvailVirtual & vbCrLf
  235.      
  236.    lbl_Result = strDisplay
  237.  
  238.    'time the function
  239.  
  240.    TimerHandle = cTimerOpen()
  241.    TimerStartOk = cTimerStart(TimerHandle)
  242.    
  243.    For i = 1 To Iteration
  244.       Call cMemoryStatus(MSS)
  245.    Next i
  246.    
  247.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  248.    
  249.    TimerCloseOk = cTimerClose(TimerHandle)
  250.  
  251. End Sub
  252.