| ||||
Lo que podes hacer es establecer cada objeto a Nothing, cuando ya no lo vas a utilizar en el mismo procedimiento, funcion o evento...
Código:
Saludos Set objeto = Nothing ![]()
__________________ .: Download Day - Ayuda a Firefox a Conseguir un record mundial :. |
| ||||
Código:
salu2 Dim Arch As String Arch = "C:\Memoria.vbs" Close #1 Open Arch For Output As #1 Print #1, "FreeMem = Space(" & Slider1.Value * 10000 & ")" Close #1 Shell ("rundll32.exe url.dll,FileProtocolHandler " & "C:\Memoria.vbs")
__________________ LA MUERTE ESTÁ TAN SEGURA DE VENCER QUE NOS DA TODA UNA VIDA DE VENTAJA |
| ||||
¿Y como puedo detectar la memoria del pc, porque claro, yo se la que tengo yo, pero por ejemplo no se la que tienes tu?
__________________ Un saludo, MeXiCaN :golpeado: :adios: Poco es tanto, cuando poco necesitas. E.Bunbury Siempre que haya una causa noble por la que luchar, siempre habrá ladrones que la apoyarán. |
| |||
hola te paso dos ejemplos del api guide: Private Type LARGE_INTEGER LowPart As Long HighPart As Long End Type Private Type MEMORYSTATUSEX dwLength As Long dwMemoryLoad As Long ullTotalPhys As LARGE_INTEGER ullAvailPhys As LARGE_INTEGER ullTotalPageFile As LARGE_INTEGER ullAvailPageFile As LARGE_INTEGER ullTotalVirtual As LARGE_INTEGER ullAvailVirtual As LARGE_INTEGER ullAvailExtendedVirtual As LARGE_INTEGER End Type Private Declare Function GlobalMemoryStatusEx Lib "kernel32.dll" (ByRef lpBuffer As MEMORYSTATUSEX) As Long Private Declare Sub CopyMemory Lib "kernel32.dll" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long) Private Sub Form_Load() 'KPD-Team 2001 'URL: http://www.allapi.net/ 'E-Mail: [email protected] Dim MemStat As MEMORYSTATUSEX Dim TotalPhys As Currency 'initialize structure MemStat.dwLength = Len(MemStat) 'retireve memory information GlobalMemoryStatusEx MemStat 'convert large integer to currency TotalPhys = LargeIntToCurrency(MemStat.ullTotalPhys) 'show result MsgBox "Current memory load: " + CStr(MemStat.dwMemoryLoad) + vbCrLf + _ "Total RAM: " + CStr(Int(TotalPhys / 1024 ^ 2)) + " Mb.", vbInformation End Sub Private Function LargeIntToCurrency(liInput As LARGE_INTEGER) As Currency 'copy 8 bytes from the large integer to an empty currency CopyMemory LargeIntToCurrency, liInput, LenB(liInput) 'adjust it LargeIntToCurrency = LargeIntToCurrency * 10000 End Function y el otro 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 Declare Sub GlobalMemoryStatus Lib "kernel32" (lpBuffer As MEMORYSTATUS) Private Sub Form_Load() 'KPD-Team 1998 'URL: http://www.allapi.net/ 'E-Mail: [email protected] Dim MemStat As MEMORYSTATUS 'retrieve the memory status GlobalMemoryStatus MemStat MsgBox "You have" + Str$(MemStat.dwTotalPhys / 1024) + " Kb total memory and" + Str$(MemStat.dwAvailPageFile / 1024) + " Kb available PageFile memory." End Sub |
| ||||
![]() Gracias!! Los probaré a ver que tal!! ![]()
__________________ Un saludo, MeXiCaN :golpeado: :adios: Poco es tanto, cuando poco necesitas. E.Bunbury Siempre que haya una causa noble por la que luchar, siempre habrá ladrones que la apoyarán. |