Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #13192
| Path | csiph.com!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Jamal <nospam@example.com> |
| Newsgroups | comp.lang.clipper.visual-objects |
| Subject | Re: Timer inside tabbed window |
| Date | Mon, 21 Dec 2020 16:03:24 -0500 |
| Organization | A noiseless patient Spider |
| Lines | 55 |
| Message-ID | <f8fb070e-700a-3f25-80ab-0bee46243c4d@example.com> (permalink) |
| References | <0ca6223b-ad5f-4219-87e1-62498b361ff7o@googlegroups.com> <i42pbbFj5jlU1@mid.individual.net> <01418e2b-dae9-4fd4-b8f7-01ceb13ea010o@googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| Injection-Info | reader02.eternal-september.org; posting-host="571cf552f50f2765bed726c1118fd191"; logging-data="867"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18TkK90Di5Vqkk/+SVbKHz5zbWasIU93RY=" |
| User-Agent | Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.5.1 |
| Cancel-Lock | sha1:w6UP82C0aqrXJQTGn0VK2MzbSLI= |
| In-Reply-To | <01418e2b-dae9-4fd4-b8f7-01ceb13ea010o@googlegroups.com> |
| Content-Language | en-US |
| Xref | csiph.com comp.lang.clipper.visual-objects:13192 |
Show key headers only | View raw
It seems you are mixing up the Window32 API function SetTimer with VO's
Self:Timer()!!
I tested the following which works fine using the SetTimer() function:
CLASS TabControl1_Page1 INHERIT DATAWINDOW
//{{%UC%}} USER CODE STARTS HERE (do NOT remove this line)
protect nTimerHandle as DWORD
method PostInit(oWindow,iCtlID,oServer,uExtra) class TabControl1_Page1
//Put your PostInit additions here
? "RegisterTimer"
self:nTimerHandle := SetTimer(self:handle(),1,1000, @Hello())
return NIL
function Hello() as void pascal
? Time() // print current time
return
Jamal
On 12/18/2020 8:09 AM, James Martin wrote:
> This is what I use (It works on the window, but not inside a tabbed window):
>
> METHOD StartTimer() AS VOID PASCAL CLASS HttpHuron
> try
> IF SELF:lTimerInit
> SELF:lTimerInit := FALSE
> SELF:StopTimer()
> ENDIF
> // If there is no timer active
> Sleep(100)
> IF SELF:nTimerHandle == 0
> // Create a new times
> SELF:nTimerHandle := SetTimer(SELF:handle(),1,1000,NULL_PTR)
> // Call the timer Method
> SELF:timer()
> SELF:lTimerInit := TRUE
> SELF:nTimer := 10
> SELF:MTimer := SELF:nTimer
> Sleep(100)
> ENDIF
> ENDTryNoReturncatch
>
> * InfoBox{SELF,"Timer Start " + Str(SELF:nTimer),IIF(SELF:lTimerInit,"Started","Not Started")}:Show()
>
> RETURN
Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Timer inside tabbed window James Martin <jmmicmc@gmail.com> - 2020-12-17 14:52 -0800
Re: Timer inside tabbed window "Wolfgang Riedmann" <wriedmann@gmail.com> - 2020-12-18 05:26 +0100
Re: Timer inside tabbed window James Martin <jmmicmc@gmail.com> - 2020-12-18 05:09 -0800
Re: Timer inside tabbed window "Wolfgang Riedmann" <wriedmann@gmail.com> - 2020-12-21 16:33 +0100
Re: Timer inside tabbed window "Glen Townsley" <coogee.2015@gmail.com> - 2020-12-22 05:07 +1000
Re: Timer inside tabbed window Jamal <nospam@example.com> - 2020-12-21 16:03 -0500
Re: Timer inside tabbed window James Martin <jmmicmc@gmail.com> - 2020-12-28 13:10 -0800
Re: Timer inside tabbed window "Urs Eggmann" <Urs.Eggmann@shinternet.ch> - 2020-12-29 21:29 +0100
csiph-web