Re: how to display a clock in a window?
If you are using a "bleeding edge" version of win32lib.ew, all the lines of code
in that library are added to your line count, and the unregistered version of Eu
will not handle
more than 300 lines of code - unless it's in what RDS calls a "stamped" library.
The "stamped" version of win32lib.ew can be downloaded from the RDS website (New
User
Contributions). I didn't see anything in your code that would require you to use
a newer version of the library than the "stamped" release.
If you already knew about this, and the problem is elsewhere, please excuse the
presumption.
Ben
YanYanCup YanYanCup wrote:
> i want to display a clock in the window that i create but i cannot do that!
> Euphoria said that my program is over 300 statment, therefore i don't know what
> happen!
> please help to check the code(many of them are copy from Brett Pantalone's
> stopwatch timer) or suggest some suggestion of how to write it and display in a
> window thanks ^0^
>
> --cute at here
> include win32lib.ew
> without warning
> integer milliseconds, seconds, minutes, hours
> milliseconds=0
> seconds=0
> minutes=0
> hours=0
> sequence timer1
> constant new_win=create(Window,"time",0,100,100,300,300,0)
> openWindow(new_win,Normal)
> setTimer(new_win, 1, 1000 )
>
> procedure onTimer_timerWin( integer timerId )
> -- This procedure runs once every second.
>
> -- increment the timer
> seconds = seconds + 1
> if seconds > 59 then
> seconds = 0
> minutes = minutes + 1
> if minutes > 59 then
> minutes = 0
> hours = hours + 1
> end if
> end if
>
> timer1=sprintf("%02d:%02d:%02",{hours,minutes,seconds})
> setPosition(new_win,30,30)
> wPuts(new_win,timer1)
> -- force an onPaint event
> --repaintWindow(Cute_light)
>
> end procedure
>
> onTimer[new_win] = routine_id( "onTimer_timerWin" )
> i have try ^^^^ 1 at here, but still can't display a clock...
> WinMain(new_win,Normal)
>
> --cute at here
>
> YanYanCup
> _____________________________________________________
> Sent by Hong Kong E-Mail at http://www.hkem.com
> It's free. It's easy. Sign up your account Now!
|
Not Categorized, Please Help
|
|