Results 1 to 4 of 4

Thread: [RESOLVED] Strange problem when resizing

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 2006
    Posts
    160

    Resolved [RESOLVED] Strange problem when resizing

    I've made a huge app which has a main MDI client, and a lot of forms which are always resized to match the MDI size.

    To resize them I make a for loop using the forms object inside the resize event of the MDI.

    If I maximize the MDI, and then I go to the desktop using for example the windows key + D once I show my program back the form shown in the MDI isn't resized as it should. It seems to be caused because some scrollbars are shown at first.

    Any tip on this problem?

  2. #2

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Sep 2006
    Posts
    160

    Re: Strange problem when resizing

    Quote Originally Posted by gavio
    Where did you put your resizing code? Can you post it?
    Well, as I already said I put it inside of the resizing event of the MDI. The code is more or less like this:

    VB Code:
    1. Dim frmName as Form
    2. For Each frmName in Forms
    3.     'Check to avoid resizing the MDI as well, otherwise it would give problems when the form is loaded
    4.     If frmName.Name <> "MDIMain" Then
    5.         frmName.Width = Me.ScaleWidth
    6.         frmName.Height = Me.ScaleHeight
    7.     End If
    8. Next

    I make some other comprobations but they don't have any effect on this situation.

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Sep 2006
    Posts
    160

    Re: Strange problem when resizing

    Well, just realized that disabling the ScrollBars property of the MDI fixes the problem (I didn't even notice that property before), it's not exactly the preferable method, but since my application never needs to show them I'd say it's not a problem anyway.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width