Uso/detección de tecla en bucle dowhile

New members who wish to post and participate in HMG Forum, please introduce yourselves in this forum by starting a new thread.

Moderator: Rathinagiri

User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Uso/detección de tecla en bucle dowhile

Post by esgici »

oscar wrote:...No problem to write in english. ...
Hola Oscar,

you are welcome wonderful word of HMG :arrow:

Saludos from Turkiye :D

I want give to you some basic info about HMG and HMG Forum:

I don't know you noticed or not: unlike similar forums, HMG Forum is a "rule-less" place. This means "limitless freedom". But this freedom comes at a price: not use it in bad faith: universal rule is simple: my freedom ends when yours begin.

As you know, xBase is an international concept, Clipper is an international programming language, MinGW and Harbour are international compilers and HMG is an international GUI library. "International" means everybody can understand each other; and this requires a common human language.

International tools never has a homogeneous (in nationality and human language) user groups. so a common language is essential.

If you write your posts in English:
  • -You win the chance to get more (various or not) answer / help from more person. This will give to you the opportunity to choose from more options.

    - More person will be utilized by getting info from your discussion.

    - Since software projects, especially in the open source area, need detailed discussions between users in order to improve; you will have contributed.

    - And (more important for me) nobody can see you as a "divisive" person.
You can write as your own speech, or translated text by anyone, anything; such as Google translator or anything else; but never send pure non-English text as question or answer.

Happy HMG'ing :D
Viva INTERNATIONAL HMG :D
User avatar
andyglezl
Posts: 1461
Joined: Fri Oct 26, 2012 7:58 pm
Location: Guadalajara Jalisco, MX
Contact:

Re: Uso/detección de tecla en bucle dowhile

Post by andyglezl »

esgici wrote:every-community-collapses-when-combined-three-evil.jpg
?????????????????

Lo siento, pero que tiene que ver esto con el bucle dowhile :roll:
Hay una sección para eso "General Discussions"
---------------------------------------------------
?????????????????
Sorry, but does this have to do with the do while loop :roll:
There is a section for that, "General Discussions"
Andrés González López
Desde Guadalajara, Jalisco. México.
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Uso/detección de tecla en bucle dowhile

Post by esgici »

andyglezl wrote:...
Sorry, but does this have to do with the do while loop :roll:
There is a section for that, "General Discussions"
You are right, no relation with "do while" (as a programming term) loop.

And, I know the section you are about.

Thank to interest.
Viva INTERNATIONAL HMG :D
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Uso/detección de tecla en bucle dowhile

Post by Pablo César »

esgici wrote:
andyglezl wrote:...
Sorry, but does this have to do with the do while loop :roll:
There is a section for that, "General Discussions"
You are right, no relation with "do while" (as a programming term) loop.

And, I know the section you are about.

Thank to interest.
So Esgici, do not comet to OFF TOPIC. No relations, no sense, no useful.

As far I know, to force something to anyone is a kind of tirany as the same picture you have produced.
If you write your posts in English:

-You win the chance to get more (various or not) answer / help from more person. This will give to you the opportunity to choose from more options.

- More person will be utilized by getting info from your discussion.
This is not true. There many spanish that can helps any many others who believe that we need to embrace the whole idea, after all we live in a globalized world, we need to live without prejudice regardless of race, creed, language ... the important and be able to freely express.

Globalization and free communication. :mrgreen:
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
oscar
Posts: 7
Joined: Mon Sep 05, 2016 3:07 am
Location: Yerba Buerna-Tucumán- Argentina

Re: Uso/detección de tecla en bucle dowhile

Post by oscar »

*/
*
* SOLVED. - NO USE LOOP DO WHILE IN PROG. GRAPH
* thanks Pablo Cesar and Draganescu
* for their contribution. They placed me on the right track.
* I stopped thinking about how to program in Clipper
* (more than 30 years doing it, from DBASE II).
* I focused on the way you would use the program.
* The goal is to compose (design) a report, treating each
* part as an object and give the user the ease of locating
* each party to consider the best place.
* - Locate Statistical Graphics, images, text, etc. -
* The difficulty was that he needed to move an object with
* the arrow keys.
* To this base, I'll add the functions of HMG example 3.4.3,
* MoveAndResizeControl () del Dr Claudio Soto
* - move and modify control with the mouse - .
* This base; (Use the keyboard to move objects); can be use too
* for simple games (letters, geometric, etc.) or some other need
* that right now I can not think.
* Surely this routine can be improved, but can also serve as
* starter for others like me.
*
* Again, thanks thousand Pablo Cesar and Draganescu
* Ing Oscar Salinas (No Systems, in constructions) - User: Oscar
*
*/

FUNCTION MAIN
Memvar Cmna, Fmna, Bugs
Cmna := 30
Fmna := 1
Bugs := "bmp\beesr.png"
DEFINE WINDOW Bees_1 ;
AT 0,0 ;
WIDTH 860 HEIGHT 720 ;
Title "Bees - - Ing Oscar A. Salinas - 2016" ;
NOSIZE ;
BACKCOLOR {255,99,71} ;
ON INIT Play() ;
MAIN
DEFINE LABEL Instruc
ROW 640
COL 207
WIDTH 580
HEIGHT 20
VALUE "Arrow up/down: Up/Down - " + ;
"Arrow Left/Right: Left/Right - " + ;
"Key Back: Rotation 180"
TRANSPARENT .T.
END LABEL
End Window

*
* two window. I need that for other items in this windows
*
Center Window Bees_1
Activate Window Bees_1
Return
Function Play()
DEFINE WINDOW Bees_2 ;
AT 47, 57 ;
WIDTH 306 HEIGHT 570 ;
NOSIZE ;
NOCAPTION ;
NOSYSMENU ;
BACKCOLOR BLUE
ON KEY LEFT OF Bees_2 ACTION Go_Left()
ON KEY RIGHT OF Bees_2 ACTION Go_Right()
ON KEY DOWN OF Bees_2 ACTION Go_Down()
ON KEY UP OF Bees_2 ACTION Go_Up()
ON KEY BACK OF Bees_2 ACTION Go_Rot()
DEFINE IMAGE Image_4
PARENT Bees_2
ROW Fmna
COL Cmna
WIDTH 60
HEIGHT 60
PICTURE ""
STRETCH .T.
TRANSPARENT .T.
BACKGROUNDCOLOR NIL
ADJUSTIMAGE .F.
END IMAGE
@ 518, 2 BUTTON FicGame ;
CAPTION "&Play" ;
PICTURE "bmp\New.bmp" LEFT ;
WIDTH 120 ;
HEIGHT 50 ;
ACTION NewGame() ;
MULTILINE ;
TOOLTIP "Play"
@ 518,185 BUTTON FicOut ;
CAPTION "&End" ;
PICTURE "bmp\Back.bmp" LEFT ;
WIDTH 120 ;
HEIGHT 50 ;
ACTION Bees_2.Release ;
MULTILINE ;
TOOLTIP "End"
End Window
Center Window Bees_2
Activate Window Bees_2
Return
Function NewGame()
Cmna := 60
Fmna := 1
IF IsControlDefined ( Image_4, Bees_2 ) == .T.
Bees_2.Image_4.Release
Endif
** here, DO CASE for many images. This Ej, only use the bee
** only drive one image at time, Using the same control (Image_4)
DEFINE IMAGE Image_4
PARENT Bees_2
ROW Fmna
COL Cmna
WIDTH 60
HEIGHT 60
PICTURE Bugs
STRETCH .T.
TRANSPARENT .F.
BACKGROUNDCOLOR NIL
ADJUSTIMAGE .F.
END IMAGE
Bees_2.Image_4.SetFocus
Return Nil
Function Go_Up()
IF IsControlDefined ( Image_4, Bees_2 ) == .T.
Bees_2.Image_4.Release
Endif
** here, DO CASE too, for many diferent images. This Ej, only use the bee
** the Row have 60 pixels. The Colum, too
Fmna := Fmna - 60
if Fmna <= 0
Fmna := 1
Endif
DEFINE IMAGE Image_4
PARENT Bees_2
ROW Fmna
COL Cmna
WIDTH 60
HEIGHT 60
PICTURE Bugs
STRETCH .T.
TRANSPARENT .F.
BACKGROUNDCOLOR NIL
ADJUSTIMAGE .F.
END IMAGE
Bees_2.Image_4.SetFocus
Return Nil
Function Go_Down()
IF IsControlDefined ( Image_4, Bees_2 ) == .T.
Bees_2.Image_4.Release
Endif
Fmna := Fmna + 60
if Fmna > 460
Fmna := 455
Endif
DEFINE IMAGE Image_4
PARENT Bees_2
ROW Fmna
COL Cmna
WIDTH 60
HEIGHT 60
PICTURE Bugs
STRETCH .T.
TRANSPARENT .F.
BACKGROUNDCOLOR NIL
ADJUSTIMAGE .F.
END IMAGE
Bees_2.Image_4.SetFocus
Return Nil
Function Go_Left()
IF IsControlDefined ( Image_4, Bees_2 ) == .T.
Bees_2.Image_4.Release
Endif
Cmna := Cmna - 60
if Cmna <= 0
Cmna := 1
Endif
DEFINE IMAGE Image_4
PARENT Bees_2
ROW Fmna
COL Cmna
WIDTH 60
HEIGHT 60
PICTURE Bugs
STRETCH .T.
TRANSPARENT .F.
BACKGROUNDCOLOR NIL
ADJUSTIMAGE .F.
END IMAGE
Bees_2.Image_4.SetFocus
Return Nil
Function Go_Right()
IF IsControlDefined ( Image_4, Bees_2 ) == .T.
Bees_2.Image_4.Release
Endif
Cmna := Cmna + 60
if Cmna > 245
Cmna := 245
Endif
DEFINE IMAGE Image_4
PARENT Bees_2
ROW Fmna
COL Cmna
WIDTH 60
HEIGHT 60
PICTURE Bugs
STRETCH .T.
TRANSPARENT .F.
BACKGROUNDCOLOR NIL
ADJUSTIMAGE .F.
END IMAGE
Bees_2.Image_4.SetFocus
Return Nil
Function Go_rot()
if bugs == "bmp\beesr.png"
Bugs := "bmp\beesl.png"
else
Bugs := "bmp\beesr.png"
endif
Bees_2.Image_4.Picture := Bugs
Bees_2.Image_4.Refresh
Return
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Uso/detección de tecla en bucle dowhile

Post by esgici »

Thanks Oscar,

for your human language choice and sharing your code with us.

A few little points:
  • - Put your code in "code" section:
    codeSection.JPG
    codeSection.JPG (43.44 KiB) Viewed 13320 times
    This will protect format (indentation etc) of your code and keep shorter its view.

    - Send your long text (including prg code) as attachment, this too will keep your post shorter.

    - For clarity (well understand), use abbreviation into your code as soon as possible clear;
    FE I can't find meaning of word "bees". :(

    - If you want your code will run without any obscurity, add your auxiliary files (image, text, .ini etc) too your post as attachment.
Again, you are welcome wonderful world of HMG :D

Viva INTERNATIONAL HMG :D
Viva INTERNATIONAL HMG :D
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Uso/detección de tecla en bucle dowhile

Post by Pablo César »

esgici wrote:Thanks Oscar,

for your human language choice
Human language ? :?
esgici wrote:"A few little points:

- Put your code in "code" section"
To use "please" it is to be gentle and polite wich should it be with anyone... :|
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
danielmaximiliano
Posts: 2611
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: Uso/detección de tecla en bucle dowhile

Post by danielmaximiliano »

Bienvenido Oscar al foro de HMG.

intenta usar "Full Editor /Preview" dentro del editor usar todas las herramientas que creas necesaria para darle forma al texto.

desde ya un Saludo desde Buenos Aires Argentina
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
oscar
Posts: 7
Joined: Mon Sep 05, 2016 3:07 am
Location: Yerba Buerna-Tucumán- Argentina

Re: Uso/detección de tecla en bucle dowhile

Post by oscar »

Thanks to Esgici, DanielMaximiliano and Pablo Cesar.
Excuse me for my mistakes. I just wanted to make
something. Of course I will consider its recommendations.
Until next time.
Javier Tovar
Posts: 1275
Joined: Tue Sep 03, 2013 4:22 am
Location: Tecámac, México

Re: Uso/detección de tecla en bucle dowhile

Post by Javier Tovar »

Roberto Lopez wrote: Fri Oct 07, 2016 2:31 pm Could be you so kind to do your posts in English, according to the international nature of this forum and its members?

Thanks!
Es triste ver como todavía hay una lucha interna entre los principales colaboradores de HMGForum, ya déjense de niñerías, si quieren que se escriba en inglés, todo debe de ser en inglés y ya. Yo por esas cositas deje de programar en HMG.... Y veo que su NUMERO DE PERSONAS ES CASI NULO en este mundo donde HAY MILLONES DE PERSONAS, dense la oportunidad de que HMG llegue a más gente para que se haga popular, yo entre los programadores que conozco... en otros foros solo 3 llegaron a conocer a HMG, la mayoría ni oyó hablar de Clipper mucho menos de HMG. Piénsenlo, HMG es un lenguaje SOLO para los que aún están en este foro??? Qué triste es esto. Y MAS CUANDO ROBETLO LOPEZ LO LIMITA....

Google Traslator:
It is sad to see that there is still an internal struggle between the main collaborators of HMGForum, and stop babes, if they want to be written in English, everything should be in English and now. I for those things stopped programming in HMG .... And I see that your NUMBER OF PEOPLE IS ALMOST NULL in this world where there are MILLIONS OF PEOPLE, give the chance that HMG reaches more people to become popular, I enter The programmers I know ... in other forums only 3 got to know HMG, most did not hear about Clipper much less HMG. Think about it, HMG is a language ONLY for those who are still in this forum ??? How sad is this. AND MORE WHEN ROBETLO LOPEZ LIMITS ....
Post Reply