近日我发现HMG(V3.4.4)中的STATUSBAR控件存在BUG,当我们不停地向STATUSBAR控件赋值时,程序所占有用的内存也在不断地增加!当你打开任务管理器可发现这一现象。请大家帮助我解决这一问题。
Dear masters,
Recently, I found a BUG in the STATUSBAR control in HMG(V3.4.4). When we keep assigning values to the STATUSBAR control, the memory occupied by the program keeps increasing!You can see this when you open task manager. Please help me solve this problem.
Code: Select all
#include "hmg.ch"
Function Main
SET DATE ANSI
DEFINE WINDOW Form_1 ;
AT 0,0 ;
WIDTH 640 ;
HEIGHT 400 ;
TITLE 'Statusbar Keyboard Demo' ;
MAIN
DEFINE STATUSBAR FONT 'Arial' SIZE 9
STATUSITEM "Statusbar Demo"
END STATUSBAR
define button bt_1
ROW 160
COL 270
WIDTH 100
HEIGHT 28
ACTION test_statusBar()
CAPTION "Test"
END button
END WINDOW
CENTER WINDOW Form_1
ACTIVATE WINDOW Form_1
Return
function test_statusBar()
while 1=1
Form_1.StatusBar.Item(1):="I like HMG very much!"
hb_idlesleep(0.1)
do events
end
return