Valhalla Legends Forums Archive | .NET Platform | [vb.net] resizing issue

AuthorMessageTime
mentalCo.
I made an override for resizing so I can make my program minimize to the system tray by detecting if the main window was minimized and executing the neccesary(c/s) code.  The problem is that all of my controls that were anchored no longer resize when I just adjust the main window, like maximizing, etc.  Is there a simple way to fix this?
October 26, 2004, 7:49 PM
Myndfyr
What is your code for minimizing to the tray?  I've done that with several programs and never had the issue you describe.
October 26, 2004, 9:47 PM
mentalCo.
[code]
Protected Overrides Sub OnResize(ByVal e As System.EventArgs)
        If Me.WindowState = FormWindowState.Minimized Then
            Me.ShowInTaskbar = False
            nicoIcon.Visible = True
        End If
    End Sub
[/code]
edit:
im curious is there an event handler being overridden that has the code to resize all the controls?  like in form designer generated code?

MyndFyre edit: Added [ code ] tags.
October 27, 2004, 1:19 AM
Myndfyr
Try calling:

[code]
MyBase.OnResize(e)
[/code]
October 27, 2004, 5:34 AM
mentalCo.
That didn't work.  But I just went ahead and commented out my onResize override and reset the anchors on my controls and it works now.
October 27, 2004, 12:45 PM

Search