Código vb:
Ver original
'Previamente se declara la función utilizando Kernel32 Declare Function SetProcessWorkingSetSize Lib "kernel32.dll" (ByVal process As IntPtr, ByVal minimumWorkingSetSize As Integer, ByVal maximumWorkingSetSize As Integer) As Integer Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click 'Código dentro de un botón Try GC.Collect() GC.WaitForPendingFinalizers() If (Environment.OSVersion.Platform = PlatformID.Win32NT) Then SetProcessWorkingSetSize(Process.GetCurrentProcess().Handle, -1, -1) Dim myProcesses As Process() = Process.GetProcesses(Environment.MachineName.ToString) Dim myProcess As Process For Each myProcess In myProcesses SetProcessWorkingSetSize(myProcess.Handle, -1, -1) Next myProcess End If Catch ex As Exception MsgBox(ex.Message) End Try End Sub
Si me podéis ayudar, os lo agradezco.
Un saludo.