呵呵,看看这个: '一个按钮,一个timer控件,一个WebBrowser Option Explicit Private Declare Function SetProcessWorkingSetSize Lib "kernel32" (ByVal hProcess As Long, ByVal dwMinimumWorkingSetSize As Long, ByVal dwMaximumWorkingSetSize As Long) As Long Private Declare Function GetCurrentProcess Lib "kernel32" () As LongPrivate Sub Command1_Click() Me.Timer1.Enabled = True End SubPrivate Sub Form_Load() Me.Timer1.Interval = 5 Me.Timer1.Enabled = False Me.Command1.Caption = "点我之后再看看用了多少内存" Me.WebBrowser1.Navigate "www.csdn.net" End SubPrivate Sub Timer1_Timer() SetProcessWorkingSetSize GetCurrentProcess, 640000, 640000 End Sub
免费的学习、交流、源码、工具下载网站,欢迎大家访问!
http://www.j2soft.cn/
'一个按钮,一个timer控件,一个WebBrowser
Option Explicit
Private Declare Function SetProcessWorkingSetSize Lib "kernel32" (ByVal hProcess As Long, ByVal dwMinimumWorkingSetSize As Long, ByVal dwMaximumWorkingSetSize As Long) As Long
Private Declare Function GetCurrentProcess Lib "kernel32" () As LongPrivate Sub Command1_Click()
Me.Timer1.Enabled = True
End SubPrivate Sub Form_Load()
Me.Timer1.Interval = 5
Me.Timer1.Enabled = False
Me.Command1.Caption = "点我之后再看看用了多少内存"
Me.WebBrowser1.Navigate "www.csdn.net"
End SubPrivate Sub Timer1_Timer()
SetProcessWorkingSetSize GetCurrentProcess, 640000, 640000
End Sub