Resize / Minimize problem.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Dave Siegel
    New Member
    • Feb 2007
    • 42

    Resize / Minimize problem.

    Hey, i have a webbrowser and i currently have this code for resizing :

    Code:
    Private Sub Form_Resize()
    
    
       With WebBrowser1
          .Width = frmMain.Width - .Left - 120
          .Height = frmMain.Height - .Top - 800
       End With
    
    End Sub
    But when i minimize or make the height too small it gives the error "invalid property value" on this line :

    Code:
          .Height = frmMain.Height - .Top - 800

    Any idea how to fix this?
  • Killer42
    Recognized Expert Expert
    • Oct 2006
    • 8429

    #2
    When resizing things dynamically like this I usually check WindowState first, and skip it if minimised.

    Comment

    Working...