J. Scott Elblein
Well-known member
Hi all
I am using this code to minimize/Restore to/from tray:
My problem is, every time I restore, the form's height gets a little smaller. I'm perplexed. Any ideas?
Thanks
I am using this code to minimize/Restore to/from tray:
VB.NET:
Private Sub frmMain_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize
If Me.WindowState = FormWindowState.Minimized Then
NotifyIcon1.Visible = True
Me.Hide()
End If
End Sub
VB.NET:
Public Sub RestoreWindow()
' Set the WindowState to normal if the form is minimized to the tray.
frmMain.Show()
If frmMain.WindowState = FormWindowState.Minimized Then
frmMain.WindowState = FormWindowState.Normal
End If
frmMain.NotifyIcon1.Visible = False
End Sub
My problem is, every time I restore, the form's height gets a little smaller. I'm perplexed. Any ideas?
Thanks