1
Abra su marco VB.NET
2
Copia y pega el siguiente código en la línea de comandos , a continuación, pulse Intro : .
Privado Tipo MEMORYSTATUS
dwLength As Long
dwMemoryLoad siempre y
dwTotalPhys siempre y
dwAvailPhys As Long
dwTotalPageFile Como
Long
dwAvailPageFile As Long
dwTotalVirtual As Long
dwAvailVirtual As Long
Tipo de terminación de
Private Declare Sub GlobalMemoryStatus Lib " kernel32 " _
( lpBuffer Como MEMORYSTATUS )
Private Sub Form_Load ( )
Dim MS Como MEMORYSTATUS
MS.dwLength = Len ( MS )
GlobalMemoryStatus MS
Label1 ( 0 ) . Caption = Formato $ ( MS.dwMemoryLoad , "# # #, # # #, # # #, # # #" ) & " % utilizado "
Label1 ( 1 ) . Caption = Formato $ ( MS.dwTotalPhys /1024 , "# # #, # # #, # # #, # # #" ) & " Kbytes "
Label1 ( 2 ) . Leyenda Formato = $ ( MS.dwAvailPhys /1024 , "# # #, # # #, # # #, # # #" ) & " Kbytes "
Label1 ( 3 ) . Caption = Formato $ ( MS. dwTotalPageFile /1024 , "# # #, # # #, # # #, # # #" ) & " Kbytes "
Label1 ( 4 ) . Caption = Formato $ ( MS.dwAvailPageFile /1024 , "# # #, # # #, # # #, # # # " ) &" Kbytes "
Label1 ( 5 ) . Caption = Formato $ ( MS.dwTotalVirtual /1024 ," # # # , # # # , # # #, # # # " ) &" Kbytes "
Label1 ( 6 ) . Caption = Formato $ ( MS.dwAvailVirtual /1024 ," # # #, # # #, # # #, # # # " ) &" Kbytes "
End Sub
3
Type" GlobalSystemMemory "(sin comillas ) y pulsar" Enter " . Este comando ahora mostrar su información de la memoria del sistema. Escriba en cualquier momento para ver a su memoria, y usted no tendrá que utilizar el código de configuración mucho más.