[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference abbott::visual_basic

Title:Microsoft Visual Basic
Moderator:TAMARA::DFEDOR::fedor
Created:Thu May 02 1991
Last Modified:Thu Jun 05 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:2565
Total number of notes:10453

2518.0. "Resizing without full window drag" by BIGUN::nessus.cao.dec.com::Mayne (Churchill's black dog) Mon Mar 17 1997 17:53

I have my system set up not to use full window drag.

When I use heights and widths in Form_Resize, the heights and widths are those 
of the window before it was dragged, not after. This plays havoc with resizing, 
because the variables are always one resize behind.

How do I get the new heights and widths when I'm not using full window drag?

PJDM
T.RTitleUserPersonal
Name
DateLines
2518.1I couldn't duplicate the problemMRSERV::PETERSTue Mar 18 1997 09:4517
    I'm a little confused by your term "full window drag". My understanding
    is that you can drag the entire window with or without the window
    content being visible during the drag process. To see the window
    content while you are dragging, you need Microsoft Plus. Either way,
    dragging a window doesn't change the size of the window, only its
    position, and therefore shouldn't affect any resizing operation. In
    fact, I have several applications where I have to resize the form
    based upon the user's change of the windows size, and haven't seen
    this problem. I'm using VB4 now, but I've done the same thing in VB3.
    
    I have full window drag enabled, but just disabled it and again tried
    a resize and move. But operation was as expected - no problem.
    
    Can you give us a few more details?
    
    Don
    
2518.2BIGUN::nessus.cao.dec.com::MayneA wretched hive of scum and villainyTue Mar 18 1997 17:0814
I should have "resized", not "dragged".

If I have "show window contents while dragging" enabled, the contents of the 
window is continuously resized while I use the border to resize the window, and 
Form_Resize is called with the height and width of the new size.

If I have "show window contents while dragging" disabled, and I use the border 
to resize the window, only an outline of the border moves while I'm resizing. 
When I let go of the mouse button, Form_Resize gets called with the height and 
width of the window before it is resized.

This is with VB5 on Windows 95.

PJDM
2518.3Still can't duplicate itMRSERV::PETERSWed Mar 19 1997 16:5615
    I went back again and tried my application that does a Form_Resize
    while "show window contents while dragging" was disabled, and again had
    no problem with the resize operation - my code worked as expected. So
    my guess is that the problem lies with VB5. In that case I should run
    into it when we convert this application from VB4 to VB5 (which should
    be shortly after I can lay my hands on a copy of VB5).
    
    Strangely, I did encounter a similar problem several weeks ago when
    trying to programatically get the position of a command button as I
    clicked on successive command buttons. It turned out the location was
    always "one behind". I never did figure out why, and was forced to use
    an alternative scheme.
    
    Don