Using the Process Explorer I found out why this happens: while working the GDI handles grow and grow and when reaching 10000 the desktop becomes instable. 10000 hanles sounds really a lot and this is always enough, if a program close unused handles. HMG didn´t do this all the time.
Here´s a simple demonstration code:
Code: Select all
#include "minigui.ch"
Function Main
DEFINE WINDOW Form_1 ;
AT 0,0 ;
WIDTH 200 HEIGHT 100 ;
MAIN
@ 10,20 TEXTBOX TextBoxName ;
VALUE "" ;
WIDTH 100 HEIGHT 20 ;
FONT "ARIAL" SIZE 09
@ 40,60 BUTTON ButtonNew ;
PICTURE "document-edit.bmp" ;
ACTION ButtonClick() ;
WIDTH 30 HEIGHT 30 FLAT
END WINDOW
ACTIVATE WINDOW Form_1
Return Nil
// -------------------------------------------------------------------------------------------------------------------------------
Function ButtonClick()
local xx
for xx := 1 to 1000
Form_1.ButtonNew.enabled := .F.
Form_1.ButtonNew.enabled := .T.
next
Return Nil
Below you can download the samlpe and the grafik.