Page 2 of 2

Re: A simple way to modify the cursor ...

Posted: Thu Dec 11, 2014 1:08 pm
by chrisjx2002
Hello,

When I compile with hmg.3.3.1 this program (I named it Cursor) I get this error

Harbour 3.2.0dev (r1407111333)
Copyright (c) 1999-2014, http://harbour-project.org/
Cursor.prg(4) Error E0030 Syntax error "syntax error at 'WINDOW'"
Cursor.prg(10) Error E0030 Syntax error "syntax error at '.'"
Cursor.prg(11) Error E0030 Syntax error "syntax error at '.'"
Cursor.prg(16) Error E0030 Syntax error "syntax error at '.'"
Cursor.prg(17) Error E0030 Syntax error "syntax error at '.'"
Cursor.prg(18) Error E0030 Syntax error "syntax error at '.'"
Cursor.prg(23) Error E0030 Syntax error "syntax error at '.'"
Cursor.prg(24) Error E0030 Syntax error "syntax error at '.'"
Cursor.prg(25) Error E0030 Syntax error "syntax error at '.'"
9 errors

No code generated.
hbmk2: Error: Running Harbour compiler (embedded). 1
(c:\hmg.3.3.1\harbour\bin\harbour.exe) -n2 Cursor.prg -DHBMK_HAS_HMG=1 -q -oC:\D
OCUME~1\CHRIST~1\LOCALS~1\Temp\hbmk_hp9hdf.dir\ -ic:\hmg.3.3.1\harbour\include -
i. -ic:\hmg.3.3.1\include
Harbour 3.2.0dev (r1407111333)
Copyright (c) 1999-2014, http://harbour-project.org/
Cursor.prg(4) Error E0030 Syntax error "syntax error at 'WINDOW'"
Cursor.prg(10) Error E0030 Syntax error "syntax error at '.'"
Cursor.prg(11) Error E0030 Syntax error "syntax error at '.'"
Cursor.prg(16) Error E0030 Syntax error "syntax error at '.'"
Cursor.prg(17) Error E0030 Syntax error "syntax error at '.'"
Cursor.prg(18) Error E0030 Syntax error "syntax error at '.'"
Cursor.prg(23) Error E0030 Syntax error "syntax error at '.'"
Cursor.prg(24) Error E0030 Syntax error "syntax error at '.'"
Cursor.prg(25) Error E0030 Syntax error "syntax error at '.'"
9 errors

No code generated.
hbmk2: Error: Running Harbour compiler (embedded). 1
(c:\hmg.3.3.1\harbour\bin\harbour.exe) -n2 Cursor.prg -DHBMK_HAS_HMG=1 -q -oC:\D
OCUME~1\CHRIST~1\LOCALS~1\Temp\hbmk_hp9hdf.dir\ -ic:\hmg.3.3.1\harbour\include -
i. -ic:\hmg.3.3.1\include
Impossible de trouver G:\Programmes\Cursor\hmgver.dat
Appuyez sur une touche pour continuer...

Re: A simple way to modify the cursor ...

Posted: Thu Dec 11, 2014 1:42 pm
by Pablo César
chrisjx2002 wrote:When I compile with hmg.3.3.1 ..//..

Harbour 3.2.0dev (r1407111333)
Copyright (c) 1999-2014, http://harbour-project.org/
Cursor.prg(4) Error E0030 Syntax error "syntax error at 'WINDOW'"
Cursor.prg(10) Error E0030 Syntax error "syntax error at '.'"
Please note this was compiled with hmg.3.3.1 including PATCHes 5 and 5b when DEFINE WINDOW assume DEFAULTs values for following parameters: row, col, width and height. These improvements had been applied by Mr. Claudio Soto when release Patch5, it is optional but need to be update you HMG.

Please read this. But in case you do not want to apply these last patches you will have to add row, col, width and height at missing WINDOW DEFINE, ok ?

Re: A simple way to modify the cursor ...

Posted: Thu Dec 11, 2014 2:13 pm
by chrisjx2002
Thanks for the fast answer. You are right. I have just to add AT 0,0 WIDTH 400 HEIGHT 300 for example and it works!

Re: A simple way to modify the cursor ...

Posted: Thu Dec 11, 2014 2:38 pm
by srvet_claudio
serge_girard wrote:Claudio,

How to change cursor from default arrow to a spinning hourglass and back to default arrow?

I need this between some time consuming process.
Something like the WAIT WINDOW but only the cursor.

Thanks, Serge
Hi Serge,
see this code:

Code: Select all

#include "hmg.ch"

Function Main
   DEFINE WINDOW Win_1 MAIN
      @ 100,100 BUTTON Button_1 CAPTION "Wait" ACTION ProcessWait()
   END WINDOW
   ACTIVATE WINDOW Win_1 
Return Nil

Function ProcessWait
      
   WAIT WINDOW "Processing" NOWAIT
       
   SetCursorSystem (IDC_WAIT)
   BT_DELAY_EXECUTION (5000)
   SetCursorSystem (IDC_ARROW)
   
   WAIT CLEAR
Return Nil

Re: A simple way to modify the cursor ...

Posted: Thu Dec 11, 2014 2:59 pm
by Pablo César
chrisjx2002 wrote:Thanks for the fast answer. You are right. I have just to add AT 0,0 WIDTH 400 HEIGHT 300 for example and it works!
Your welcome ! I made that purposely for people seing new improvements in HMG.

But IMO you should apply all pending patches in your HMG library.

Then you will have the chance to create screen at quite full size of you desktop dimensions.
srvet_claudio wrote: SetCursorSystem (IDC_WAIT)

BT_DELAY_EXECUTION (5000)

SetCursorSystem (IDC_ARROW)
Thank you Claudio.

Re: A simple way to modify the cursor ...

Posted: Sat Dec 13, 2014 9:29 am
by dhaine_adp
Thanks Dr. for the little sample that you've posted.

Re: A simple way to modify the cursor ...

Posted: Sat Dec 13, 2014 6:44 pm
by Javier Tovar
Gracias Dr. Claudio Soto por el demo!

Saludos