Page 2 of 3

Re: Draw text and Draw Line in Window

Posted: Wed Jun 20, 2012 6:26 pm
by spelman
Hi Esgici,

Sorry for taking so long to say thanks for your sample code - I've been away from the computer for a few days.

I'll study your example, and make use of the tecniques. Actually I'm just at the stage of the project where I need
to do some line drawing , so it's very usefull to me ....

Thanks once again,

Steve

Re: Draw text and Draw Line in Window

Posted: Wed Jun 20, 2012 7:05 pm
by esgici
Hi Steve
spelman wrote:Sorry for taking so long to say thanks for your sample code
No problem, all we are friends here :)
spelman wrote:...so it's very usefull to me ....
I'm glad that :)

Happy HMG'ing :D

Regards

--

Esgici

Re: Draw text and Draw Line in Window

Posted: Thu Jun 21, 2012 2:08 pm
by Pablo César
Very usefull example Mr. Esgici, thank you for you contribution and congratulations !

Re: Draw text and Draw Line in Window

Posted: Thu Jun 21, 2012 2:42 pm
by esgici
Thanks Pablo :)

Saludos

--

Esgici

Re: Draw text and Draw Line in Window

Posted: Thu Jun 21, 2012 4:18 pm
by Rathinagiri
Hi Esgici,

I have started using your idea but when drawing many lines and erasing them, I found that everytime all the lines are drawn and then erased. Can't we avoid that?

Re: Draw text and Draw Line in Window

Posted: Thu Jun 21, 2012 4:36 pm
by esgici
rathinagiri wrote: I have started using your idea but when drawing many lines and erasing them, I found that everytime all the lines are drawn and then erased. Can't we avoid that?
I want a few play with lines (ah, these gold days of DOS :( ) and me too, I'm wondering answer of this question :(

My opinion is: this is no erasing but drawing issue, because erasing by this way actually is drawing.

Maybe author of DRAW commands will explain this situation.

Regards

--

Esgici

Re: Draw text and Draw Line in Window

Posted: Thu Jun 21, 2012 4:46 pm
by esgici
Hi Rathi

If version you are using include line :

Code: Select all

RESTORE WINDOW frmEraseLine
could you try without it ?

Regards

--

Esgici

Re: Draw text and Draw Line in Window

Posted: Thu Jun 21, 2012 4:52 pm
by Rathinagiri
I will check and tell you.

I have a dirty way of erasing the things.

All the draw commands are stored in _HMG_SYSDATA [ 102 ] ( i being the form index as I have mentioned in the first post in this thread).

They are in the order of our commands. So, if I want to erase the draw command that I have drawn first,

I use,

i := getformindex( cFormName )
adel( _HMG_SYSDATA [ 102 ] [ i ], 1 )
asize( _HMG_SYSDATA [ 102 ] [ i ], len( _HMG_SYSDATA [ 102 ] [ i ] ) - 1 )

that's all. Next time the window is painted, the first draw command is not drawn.

Re: Draw text and Draw Line in Window

Posted: Tue Jun 26, 2012 2:00 pm
by esgici
Hi Rathi
rathinagiri wrote:I will check and tell you.
I'm still waiting :(
rathinagiri wrote: I use, ...
Sorry, I can't achieve this method; it work (no causing any problem, error etc), but I can't see the result ( erasing drawn object ) :?

Could you give an example please ?
rathinagiri wrote: Next time the window is painted, ...
This point also is obscure for me :(

I don't know what is "time the window (re) painted" :(

If this is an "automatic" event made by system, when or under which conditions it occurs :?:

Thanks in advance :D

Best regards

--

Esgici

Re: Draw text and Draw Line in Window

Posted: Tue Jun 26, 2012 3:17 pm
by Rathinagiri
Hi Esgici,

I will post an example tomorrow.

Window will be automatically repainted whenever it is moved, restored, minimized or movement of mouse over.