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?
What is your code for minimizing to the tray? I've done that with several programs and never had the issue you describe.
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
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.
Try calling:
MyBase.OnResize(e)
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.