_SetNextFocus()

Source code related resources

Moderator: Rathinagiri

User avatar
Anand
Posts: 595
Joined: Tue May 24, 2016 4:36 pm
DBs Used: DBF

Re: _SetNextFocus()

Post by Anand »

BeGeS,

As per your requirement, pure Harbour should solve your problem. Your Clipper code will execute fine and your user will also be able to do entry very fast through keyboard. I have such application made / converted for a 64 bit machine. The users do not see any difference.

Now comes to windows environment. Here one has to think differently than DOS. Move to HMG with small application as your users graduate on it.

Regards,

Anand
Regards,

Anand

Image
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: _SetNextFocus()

Post by Rathinagiri »

For me there are no GUI users and console users. There are jobs and jobs. And each type of work requires a suitable tool. The user must judge, never a developer locked in his study, because what is theoretically good, in practice may be useless.

A real example: an administrative who every afternoon devotes an hour to making invoices, and in that time he makes about fifty. The references are not many (it's a cheese factory) and are well coded, so that it practically works with one hand, the right, "spilled" on the numeric block, INTRO and arrows. It does so at a dizzying speed. If to move between the different fields had to use TAB and SHIFT-TAB, it would lose much operability.
I do agree. That is why we have 'Set Navigation Extended'.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
BeGeS
Posts: 125
Joined: Fri Jul 14, 2017 10:45 am
DBs Used: DBF
Location: La Mancha, Spain

Re: _SetNextFocus()

Post by BeGeS »

Anand wrote: Wed Jul 19, 2017 4:26 pm As per your requirement, pure Harbour should solve your problem. Your Clipper code will execute fine and your user will also be able to do entry very fast through keyboard. I have such application made / converted for a 64 bit machine. The users do not see any difference.
Thanks, Anand, ;) ... but that's what I've been doing for months: compiling Clipper programs in Harbour (a wonder) so that my customers can have on their S.O. 64 bit and its usual programs.
The GUI keyboard "problem" is solved with the function I showed on the previous page. After the test that Serge has done, I have realized that the conflict is generated by another process.

Anand wrote: Wed Jul 19, 2017 4:26 pm Now comes to windows environment. Here one has to think differently than DOS. Move to HMG with small application as your users graduate on it.
I do not know what you mean by this. My programs have worked on Windows since version 95 until they have been 64 bit, and with pure Harbour is solved.
You talk about windows environment, je, je ... A client of mine, to prove, opened 32 windows with programs of his application in Clipper. This was done in the last century, with W98.
I do not see the need to think differently, nor do I have to get accustomed to something worse, said in the sense of slower in handling. With HMG what I want is to optimize the use of programs, which in the end will do the same.

Greetings. ;)
I get by with a little help from my friends
User avatar
BeGeS
Posts: 125
Joined: Fri Jul 14, 2017 10:45 am
DBs Used: DBF
Location: La Mancha, Spain

Re: _SetNextFocus()

Post by BeGeS »

Rathinagiri wrote: Wed Jul 19, 2017 4:36 pm That is why we have 'Set Navigation Extended'.
In addition to being able to use ENTER as TAB, what other things does it allow?
I get by with a little help from my friends
User avatar
SALINETAS24
Posts: 667
Joined: Tue Feb 27, 2018 3:06 am
DBs Used: DBF
Contact:

Re: _SetNextFocus()

Post by SALINETAS24 »

Hola a todos.
Para aquellos que quieren usar las Flechas para subir, bajar o ir al siguiente campo os paso una rutina que he construido, cogiendo un poco de aquí y otro poco de allí.
La función detecta que no tenga el FOCUS en un GRID, para que no se vuelva loco su comportamiento.
El el PRG principal (Main o Menú) pondremos ..

Code: Select all

// -> PROCEDIMIENTO PARA ACTIVAR LAS TECLAS DE FUNCION
CREATE EVENT PROCNAME MyFuncKey ()
y después añadiremos esta función

Code: Select all

//----------------------------------------------------------------------------------------------------
//---> FUNCION PARA ACTIVA LA AGENDA Y LA CALCULADORA y LAS FLECHAS
//----------------------------------------------------------------------------------------------------

Function MyFuncKey ()

LOCAL  nHWnd:=EventHWND ()
LOCAL  nMsg:=EventMSG ()
LOCAL  nWParam:=EventWPARAM ()
LOCAL  nLParam:=EventLPARAM ()
LOCAL i := ASCAN ( _HMG_SYSDATA [3] ,  nHWnd )
	
		DO CASE
		CASE HMG_GetLastVirtualKeyDown () == VK_F3
			_MAINCALC()       //->  Aqui activo la calculadora del amigo Mustafa.
		CASE HMG_GetLastVirtualKeyDown () == VK_F2
			_AGENDA()	        //-> Aquí activo una agenda.., una especie de dietario
		// --> y Ahora vienen las flechas	
		CASE HMG_GetLastVirtualKeyDown () == VK_UP .AND. i > 0 .AND. ( _HMG_SYSDATA [1] [i] != "GRID")
			HMG_CLEANLASTVIRTUALKEYDOWN() ; HMG_PRESSKEY(VK_SHIFT,VK_TAB)
		CASE HMG_GetLastVirtualKeyDown () == VK_DOWN .AND. i > 0 .AND. ( _HMG_SYSDATA [1] [i] != "GRID")
			HMG_CLEANLASTVIRTUALKEYDOWN() ; HMG_PRESSKEY(VK_TAB)
	ENDCASE
	
	HMG_CleanLastVirtualKeyDown()
	
RETURN

Pues eso es todo.., que lo disfrutéis.
Como dijo el gran pensador Hommer Simpson..., - En este mundo solo hay 3 tipos de personas, los que saben contar y los que no. :shock:
Post Reply