|
-
Dec 20th, 2006, 11:46 AM
#1
Thread Starter
Addicted Member
[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?
-
Dec 20th, 2006, 12:11 PM
#2
Re: Strange problem when resizing
Where did you put your resizing code? Can you post it?
-
Dec 20th, 2006, 12:19 PM
#3
Thread Starter
Addicted Member
Re: Strange problem when resizing
 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:
Dim frmName as Form
For Each frmName in Forms
'Check to avoid resizing the MDI as well, otherwise it would give problems when the form is loaded
If frmName.Name <> "MDIMain" Then
frmName.Width = Me.ScaleWidth
frmName.Height = Me.ScaleHeight
End If
Next
I make some other comprobations but they don't have any effect on this situation.
-
Dec 20th, 2006, 02:18 PM
#4
Thread Starter
Addicted Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|