Sizing-End
-
Hi everyone, in my project, i have a DataGrid. If i size the ChildWindow, i refresh the number of rows of the grid relative to the height. At the refresh-function i need to change and load some things ( for example a new record from the DB ) So it takes a certain duration. If i resize the Frame slowly, it works nice. But if i resize it very fast, so there a many callings to resize the form. For that reason i will lock the "Refresh-function" and only refresh at the end of the resizing. But how can i "see" that the user has stopped the resizing of the frame? Any ideas? Big thanks :)
-
Hi everyone, in my project, i have a DataGrid. If i size the ChildWindow, i refresh the number of rows of the grid relative to the height. At the refresh-function i need to change and load some things ( for example a new record from the DB ) So it takes a certain duration. If i resize the Frame slowly, it works nice. But if i resize it very fast, so there a many callings to resize the form. For that reason i will lock the "Refresh-function" and only refresh at the end of the resizing. But how can i "see" that the user has stopped the resizing of the frame? Any ideas? Big thanks :)
Hmm when the resizing stops, the user as released the mouse... maybe you can catch this event and look everytime its called if there had been a resizement. Maybe by a "locking" variable in your "refresh Function" -> Mosedown -> lock enable refresh part not called -> Moseup -> lock release -> refresh/paint
-
Hmm when the resizing stops, the user as released the mouse... maybe you can catch this event and look everytime its called if there had been a resizement. Maybe by a "locking" variable in your "refresh Function" -> Mosedown -> lock enable refresh part not called -> Moseup -> lock release -> refresh/paint
-
Yeah, i had the same idea, but the Resizing-Border of the View nor of the Frame will call a MouseUp-Event Trotzdem Danke ;)
Trapping the mouse will have no effect when sizing, you should try using the
WM_ENTERSIZEMOVE
andWM_EXITSIZEMOVE
. BTW. these two messages are only sent to the main window and not child controls. Another message you could try trapping is theWM_WINDOWPOSCHANGED
. -
Trapping the mouse will have no effect when sizing, you should try using the
WM_ENTERSIZEMOVE
andWM_EXITSIZEMOVE
. BTW. these two messages are only sent to the main window and not child controls. Another message you could try trapping is theWM_WINDOWPOSCHANGED
.