Hola Masters,
i can use ON SIZE event when i size a window,
but how about moving a window... any ON MOVE ?
or how can i catch the move event ?
Thks n rgds
Chang
Event for moving a window
Moderator: Rathinagiri
Event for moving a window
Just Hmg It !
Re: Event for moving a window
Maybe...
OnMouseDrag Event
Occurs when the user drag in a Window
Syntax:
OnMouseDrag <ActionProcedure>
The following data are available at ‘OnMouseClick’ procedure:
_HMG_SYSDATA [ 191 ] -> Mouse Row
_HMG_SYSDATA [ 192 ] -> Mouse Col
OnMouseDrag Event
Occurs when the user drag in a Window
Syntax:
OnMouseDrag <ActionProcedure>
The following data are available at ‘OnMouseClick’ procedure:
_HMG_SYSDATA [ 191 ] -> Mouse Row
_HMG_SYSDATA [ 192 ] -> Mouse Col
Andrés González López
Desde Guadalajara, Jalisco. México.
Desde Guadalajara, Jalisco. México.
Re: Event for moving a window
Hola and thanks Andy,
it happen if the mouse pointer is inside the window that wont cause the window
to move.
When we move window the mouse is at the title bar of the window,
that what can move the whole window across the screen,
unfortunately i don't know what event to check ( ON MOVE ?)
Thks n Rgds
Chang
HMG -
Happy Make Good
it happen if the mouse pointer is inside the window that wont cause the window
to move.
When we move window the mouse is at the title bar of the window,
that what can move the whole window across the screen,
unfortunately i don't know what event to check ( ON MOVE ?)
Thks n Rgds
Chang
HMG -
Happy Make Good
Just Hmg It !
- AUGE_OHR
- Posts: 2064
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Re: Event for moving a window
hi,
do you you wat to move hole Window
Source is in x:\hmg.3.4.4\SOURCE\c_windows.c
do you you wat to move hole Window
Code: Select all
MoveWindow( hWnd, col, row, width, height, .T. )
have fun
Jimmy
Jimmy
Re: Event for moving a window
Hi Auge_OHR,
thks for the info.
Pls be kind to give a ssw ( small simple working) example
with hmg since I never learn C.
Thks n Rgds
Chang
thks for the info.
Pls be kind to give a ssw ( small simple working) example
with hmg since I never learn C.
Thks n Rgds
Chang
Just Hmg It !
- Claudio Ricardo
- Posts: 367
- Joined: Tue Oct 27, 2020 3:38 am
- DBs Used: DBF, MySQL, MariaDB
- Location: Bs. As. - Argentina
Re: Event for moving a window
Hi... Maybe:
In Main.fmg set:
OnMouseMove OnMove ()
Code: Select all
#include <hmg.ch>
Function Main
PRIVATE nRow, nCol
Load Window Main
Main. Center
nRow := GetProperty ("Main" , "Row")
nCol := GetProperty ("Main" , "Col")
Main. Activate
Return
// -------------------------------------------------------------------------------------------------------- //
Function OnMove
If nRow <> GetProperty ("Main" , "Row") .OR. nCol <> GetProperty ("Main" , "Col")
MsgInfo ("La ventana se ha movido !" , "Aviso !")
nRow := GetProperty ("Main" , "Row")
nCol := GetProperty ("Main" , "Col")
EndIf
Return Nil
OnMouseMove OnMove ()
Corrige al sabio y lo harás más sabio, Corrige al necio y lo harás tu enemigo.
WhatsApp / Telegram: +54 911-63016162
WhatsApp / Telegram: +54 911-63016162