A simple way to modify the cursor ...
Moderator: Rathinagiri
- Richard_Schmidt
- Posts: 21
- Joined: Wed Jul 31, 2013 3:23 pm
- Location: Germany
A simple way to modify the cursor ...
Hallo folks,
I want to temporarily change the standard cursor shape (arrow) to the hourglass shape and back to show that the programm needs some time for calculations.
With dBFast ther was a command "SET CURSOR TO ARROW" resp. "SET CURSOR TO ARROW" to do this.
How can this be done with HMG ?
Best Regards
Richard
-----------------------------------------------------
Hola amigos,
Quiero cambiar temporalmente la forma del cursor estándar (flecha) a la forma de reloj de arena y volver a demostrar que el program necesita un poco de tiempo para los cálculos.
Con DBFAST allí era un comando "SET CURSOR TO ARROW" resp. "SET CURSOR TO ARROW" para cambiar el imagen.
¿Cómo se puede hacer esto con HMG?
Recuerdos
Richard
I want to temporarily change the standard cursor shape (arrow) to the hourglass shape and back to show that the programm needs some time for calculations.
With dBFast ther was a command "SET CURSOR TO ARROW" resp. "SET CURSOR TO ARROW" to do this.
How can this be done with HMG ?
Best Regards
Richard
-----------------------------------------------------
Hola amigos,
Quiero cambiar temporalmente la forma del cursor estándar (flecha) a la forma de reloj de arena y volver a demostrar que el program necesita un poco de tiempo para los cálculos.
Con DBFAST allí era un comando "SET CURSOR TO ARROW" resp. "SET CURSOR TO ARROW" para cambiar el imagen.
¿Cómo se puede hacer esto con HMG?
Recuerdos
Richard
- esgici
- Posts: 4543
- Joined: Wed Jul 30, 2008 9:17 pm
- DBs Used: DBF
- Location: iskenderun / Turkiye
- Contact:
Re: A simple way to modify the cursor ...
<hmg>\SAMPLES\Controls\Cursor\CURSOR.2Richard_Schmidt wrote: I want to temporarily change the standard cursor shape (arrow) to the hourglass shape and back to show that the programm needs some time for calculations.
You need also a cursor file like "wait.cur"
Viva INTERNATIONAL HMG
- mustafa
- Posts: 1160
- Joined: Fri Mar 20, 2009 11:38 am
- DBs Used: DBF
- Location: Alicante - Spain
- Contact:
Re: A simple way to modify the cursor ...
Hola amigos
Este tema ya se planteo hace tiempo al Maestro
Con Win_1.Cursor := "finger", el "finger" sale por toda la ventana
pero si creas Botones, cuando los pulsas se convierte el cursor
otra vez en punta de flecha.
http://hmgforum.com/viewtopic.php?f=5&t=1182" onclick="window.open(this.href);return false;
investigue hace tiempo y en MinGUi Extended
se logra con :
SetHandCursor( GetControlHandle("Button_D01", "Form_1X"), "Bmp\Finger.cur" ) // <-MiniguiExtended
Creo que nosotros no tenemos -------> SetHandCur,sor
tenemos parecido -----------> HandCursor pero no hace nada
HandCursor( GetControlHandle("Button_D01", "Form_1X"), "Bmp\Finger.cur" ) // <----- en HMG does nothing
saludos
Mustafa
*------------------------------------------------------------------------------*
Hello friends
This subject was raised while the Master
With Win_1.Cursor: = "finger", the "finger" goes for the whole window
but if you create buttons, when you click becomes the cursor
again arrowhead.
http://hmgforum.com/viewtopic.php?f=5&t=1182" onclick="window.open(this.href);return false;
http://hmgforum.com/viewtopic.php?f=9&t=1170&start=10" onclick="window.open(this.href);return false;
investigate long and Mingui Extended
is achieved by:
SetHandCursor( GetControlHandle("Button_D01", "Form_1X"), "Bmp\Finger.cur" ) // <-MiniguiExtended
I think that we have no -------> SetHandCursor
we like ------------> Handcursor but does nothing
Handcursor (GetControlHandle ("Button_D01", "Form_1X"), "bmp \ Finger.cur") / / <----- in HMG does nothing
regards
Mustafa
Este tema ya se planteo hace tiempo al Maestro
Con Win_1.Cursor := "finger", el "finger" sale por toda la ventana
pero si creas Botones, cuando los pulsas se convierte el cursor
otra vez en punta de flecha.
http://hmgforum.com/viewtopic.php?f=5&t=1182" onclick="window.open(this.href);return false;
investigue hace tiempo y en MinGUi Extended
se logra con :
SetHandCursor( GetControlHandle("Button_D01", "Form_1X"), "Bmp\Finger.cur" ) // <-MiniguiExtended
Creo que nosotros no tenemos -------> SetHandCur,sor
tenemos parecido -----------> HandCursor pero no hace nada
HandCursor( GetControlHandle("Button_D01", "Form_1X"), "Bmp\Finger.cur" ) // <----- en HMG does nothing
saludos
Mustafa
*------------------------------------------------------------------------------*
Hello friends
This subject was raised while the Master
With Win_1.Cursor: = "finger", the "finger" goes for the whole window
but if you create buttons, when you click becomes the cursor
again arrowhead.
http://hmgforum.com/viewtopic.php?f=5&t=1182" onclick="window.open(this.href);return false;
http://hmgforum.com/viewtopic.php?f=9&t=1170&start=10" onclick="window.open(this.href);return false;
investigate long and Mingui Extended
is achieved by:
SetHandCursor( GetControlHandle("Button_D01", "Form_1X"), "Bmp\Finger.cur" ) // <-MiniguiExtended
I think that we have no -------> SetHandCursor
we like ------------> Handcursor but does nothing
Handcursor (GetControlHandle ("Button_D01", "Form_1X"), "bmp \ Finger.cur") / / <----- in HMG does nothing
regards
Mustafa
- srvet_claudio
- Posts: 2193
- Joined: Thu Feb 25, 2010 8:43 pm
- Location: Uruguay
- Contact:
Re: A simple way to modify the cursor ...
See this sample:
Code: Select all
#include "hmg.ch"
Function Main
DEFINE WINDOW Win_1 ;
AT 0,0 ;
WIDTH 400 ;
HEIGHT 400 ;
TITLE 'Hello World!' ;
MAIN
@ 50, 50 BUTTON Button_1 CAPTION "Hello" ACTION MsgInfo ()
END WINDOW
Win_1.Cursor := "finger"
SETWINDOWCURSOR (Win_1.Button_1.Handle, "finger")
CENTER WINDOW Win_1
ACTIVATE WINDOW Win_1
Return
Re: A simple way to modify the cursor ...
Excellent
Thank you Dr. Caludio
Thank you Dr. Caludio
BPD
Convert Dream into Reality through HMG
Convert Dream into Reality through HMG
- mustafa
- Posts: 1160
- Joined: Fri Mar 20, 2009 11:38 am
- DBs Used: DBF
- Location: Alicante - Spain
- Contact:
Re: A simple way to modify the cursor ...
Amigo Claudio
Magnífico
saludos
Mustafa
Claudio Friend
magnificent
regards
Mustafa
Magnífico
saludos
Mustafa
Claudio Friend
magnificent
regards
Mustafa
- serge_girard
- Posts: 3167
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Re: A simple way to modify the cursor ...
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
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
There's nothing you can do that can't be done...
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
Re: A simple way to modify the cursor ...
Hi Serge,
See if is this what you are needing:
IDC_WAIT is the CONSTANT declared at C:\hmg.3.3.1\INCLUDE\i_controlmisc.ch corresponding to hourglass.
You will see at buttons a finger cursor and according WAIT WINDOW (start/stop) will be changed.
I hope be useful.
See if is this what you are needing:
Code: Select all
#include "hmg.ch"
Function Main
DEFINE WINDOW Win_1 TITLE 'WAIT WINDOW DEMO 1' MAIN CURSOR Nil
@ 70,70 BUTTON Button_1 CAPTION 'WAIT WINDOW "Processing..." NOWAIT' ACTION Test1() WIDTH 250
@ 100,70 BUTTON Button_2 CAPTION 'WAIT CLEAR' ACTION Test2() WIDTH 250
END WINDOW
SetWindowCursor( Win_1.Button_1.Handle, "HMG_FINGER" )
SetWindowCursor( Win_1.Button_2.Handle, "HMG_FINGER" )
ACTIVATE WINDOW Win_1
Return Nil
Function Test1()
SetWindowCursor( Win_1.Handle, IDC_WAIT )
SetWindowCursor( Win_1.Button_1.Handle, IDC_WAIT )
SetWindowCursor( Win_1.Button_2.Handle, "HMG_FINGER" )
WAIT WINDOW "Processing..." NOWAIT
Return Nil
Function Test2()
SetWindowCursor( Win_1.Handle, IDC_ARROW )
SetWindowCursor( Win_1.Button_1.Handle, IDC_ARROW )
SetWindowCursor( Win_1.Button_2.Handle, "HMG_FINGER" )
WAIT CLEAR
Return Nil
You will see at buttons a finger cursor and according WAIT WINDOW (start/stop) will be changed.
I hope be useful.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
- serge_girard
- Posts: 3167
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Re: A simple way to modify the cursor ...
Thanks Pablo!
Serge
Serge
There's nothing you can do that can't be done...
Re: A simple way to modify the cursor ...
Thank you Pablo!
Best Regards,
Nikos.
os: Windows Server 2019 - 64
Nikos.
os: Windows Server 2019 - 64