Is it possible subclass or catch VB6 form Resize Begin and resize End
"events"?
BR;
Mex
Yes. Watch for (the first) WM_SIZING and WM_SIZE.
If subclassing itself is the issue, see: http://vb.mvps.org/samples/HookXP
--
.NET: It's About Trust!
http://vfred.mvps.org
Yes i already found about WM_SIZING and WM_SIZE, sublassing is working fine
but...
1) I never get WM_SIZING notification
2) Using WM_SIZE i can get resize begin, but how to find out, when user ends
resizing window?
BR;
Mex
"Karl E. Peterson" <ka...@exmvps.org> kirjutas s�numis news:
eGOvkCHQ...@TK2MSFTNGP06.phx.gbl...
WM_SIZE is when it has finished (and during dragging if configured to do
so) and you should resize the window contents.
WM_SIZING is also sent during resizing so your code can check if the
size is ok.
There is no explicit start or end, but wm_size is the closest.
See the MSDN pages for (much) more information.
--
Dee Earley (dee.e...@icode.co.uk)
i-Catcher Development Team
iCode Systems
Why do you need to do this? Maybe there is another way to accomplish what
you are trying to do.
On my form i have a unicodelistview, this listview is resized to "fill"
entire form.
Columns widths are calculated dynamically and relative to column
headers.(analogue to .NET DataGridView AutoSizeColumnsMode - Fill)
When i add manifest file to my application and listview contains many rows,
then sometimes resizing is veeery slow and flickering.
My idea was;
1) Cacth when the user begins to resize form
2) Stop dynamic colwidth calculaton
3) when user ends resizing, then calculate col. widths
sry about my poor english :)
Meelis
"Nobody" <nob...@nobody.com> kirjutas s�numis news:
uQ2RXWOQ...@TK2MSFTNGP05.phx.gbl...
You could ignore the users preference (resize contents while resizing is
an option) and set a timer in wm_size, kill and set it again in all
subsequent attempts, then in the timer callback, do the column calculation.
This means column calculations will always be Xms after they stopped
resizing it.
>My idea was;
>1) Cacth when the user begins to resize form
>2) Stop dynamic colwidth calculaton
>3) when user ends resizing, then calculate col. widths
This might help:
Const WM_ENTERSIZEMOVE& = &H231
Const WM_EXITSIZEMOVE& = &H232
Wolfgang
Bingo. Them's the ones.
I can read from MSDN about WM_ENTERSIZEMOVE
The WM_ENTERSIZEMOVE message is sent one time to a window after it enters
the moving or sizing modal loop. The window enters the moving or sizing
modal loop when the user clicks the window's title bar or sizing border, or
when the window passes the WM_SYSCOMMAND message to the DefWindowProc
function and the wParam parameter of the message specifies the SC_MOVE or
SC_SIZE value. The operation is complete when DefWindowProc returns.
is this the reason why dont get WM_ENTERSIZEMOVE,because user is not sizing
listview but usercontol on what this listview is created?
Meelis
"Meelis Lilbok" <meelis...@deltmar.ee> kirjutas sļæ½numis news:
6E775BB6-4D8A-4ED5...@microsoft.com...
What window are you subclassing?
That message is going to go to the form; not the listview, not the usercontrol.
But i think this problem is not related to resizing.
I tested it with XP, Vista and Win 7.
Problem is only with Vista and Win7.
When i remove manifest file then it works normally with Vista and 7 too.
With XP everything works fine with manifest too.
Meelis
"Karl E. Peterson" <ka...@exmvps.org> kirjutas s�numis news:
#VZkLlSQ...@TK2MSFTNGP06.phx.gbl...