Draw text and Draw Line in Window

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

spelman
Posts: 20
Joined: Thu Sep 22, 2011 5:38 pm

Re: Draw text and Draw Line in Window

Post 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
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Draw text and Draw Line in Window

Post 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
Viva INTERNATIONAL HMG :D
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Re: Draw text and Draw Line in Window

Post by Pablo César »

Very usefull example Mr. Esgici, thank you for you contribution and congratulations !
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Draw text and Draw Line in Window

Post by esgici »

Thanks Pablo :)

Saludos

--

Esgici
Viva INTERNATIONAL HMG :D
User avatar
Rathinagiri
Posts: 5481
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Draw text and Draw Line in Window

Post 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?
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Draw text and Draw Line in Window

Post 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
Viva INTERNATIONAL HMG :D
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Draw text and Draw Line in Window

Post by esgici »

Hi Rathi

If version you are using include line :

Code: Select all

RESTORE WINDOW frmEraseLine
could you try without it ?

Regards

--

Esgici
Viva INTERNATIONAL HMG :D
User avatar
Rathinagiri
Posts: 5481
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Draw text and Draw Line in Window

Post 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.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Draw text and Draw Line in Window

Post 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
Viva INTERNATIONAL HMG :D
User avatar
Rathinagiri
Posts: 5481
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Draw text and Draw Line in Window

Post 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.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
Post Reply