Re: win32Lib and procedure free_console()
- Posted by sergelli Aug 23, 2012
- 1272 views
ghaberek said...
include std/console.e -- namespace console console:free_console()
-Greg
O.K. The error is resolved. But the black console keeps popping up.
Please, some kind soul:) could analyze what is wrong in my code????
Program one:
-- exe1.exw include WIN32lib.ew include std/console.e console:free_console() --------- Main ---------------------------------------- global constant WIN1 = create( Window, "exe1", 0, Default, Default, 222, 222, 0 ) setFont(WIN1,"Courier New",12,"Bold") setTimer( WIN1, 1, 10000 ) -------------------------------------------------------------- procedure ontimer(integer self, integer event, sequence parms) free_console() system("exe2.exe",2) -- free_console() end procedure -------------------------------------------------------------- setHandler(WIN1, w32HTimer, routine_id("ontimer")) WinMain( WIN1, Normal )
Program Two -- remember that you need to compile the program 2
-- exe2.exw -- please make an exe2.exe include WIN32lib.ew include std/console.e console:free_console() --------- Main --------------------------------------------------- constant TODO=command_line() ,WIN2=create( Window,"Exe-2",0, Default, Default, 902, 449, 0 ) -------------------------------------------------------------------- procedure onOpenWIN2(integer self, integer event, sequence parms) free_console() self = message_box("Uuuuuh" ,"Mesage !", MB_ICONEXCLAMATION + MB_TASKMODAL) free_console() end procedure --------------------------------------------------------------------- setHandler( WIN2, w32HOpen, routine_id("onOpenWIN2")) if length(TODO)=2 then WinMain(WIN2, Normal) -- test exe2.exw elsif length(TODO)=3 then onOpenWIN2(0,0,"") -- call in exe1.exw elsif length(TODO)=4 then onOpenWIN2(0,0,"") -- to do elsif length(TODO)=5 then onOpenWIN2(0,0,"") -- to do end if