VB5 internet browser bugs...

hi,
in VB5 ,we can create our own internet browser using setup wizard,
but the problem is when we minimize the browser , a bug/error message come out
said that 'RUN TIME ERROR 380'?
how can i fix it?
thats alot.

if posibble ,i can send that file to u for easy reference..
michaelairAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
clifABBConnect With a Mentor Commented:
The problem is that, when you minimize the value passed to Picture1.Height is a negative number (height and width can never be negative).
What you need is to test for minimized and only adjust if not.
Try this code:
Private Sub Form_Resize()
  If frmBrowser.WindowState <> vbMinimized Then
    Picture1.Height = frmBrowser.ScaleHeight - Picture1.Top - 50
    Picture1.Width = frmBrowser.ScaleWidth - (Picture1.Left * 2)
    WebBrowser1.Height = Picture1.Height
    WebBrowser1.Width = Picture1.Width
    TabStrip1.Width = Picture1.Width
    'Whatever else
  End If
End Sub
0
 
clifABBCommented:
Does this error happen during developement mode?  If so, what is the line that it stops on?  (Click 'Debug' from the error box)
0
 
michaelairAuthor Commented:
Private Sub Form_Resize()
   (this line)->Picture1.Height = frmBrowser.ScaleHeight - Picture1.Top - 50
   Picture1.Width = frmBrowser.ScaleWidth - (Picture1.Left * 2)
   WebBrowser1.Height = Picture1.Height
   WebBrowser1.Width = Picture1.Width
   TabStrip1.Width = Picture1.Width
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
michaelairAuthor Commented:
error come out when minimize the browser window..

Private Sub Form_Resize()
   ->> cboAddress.Width = Me.ScaleWidth - 100
    brwWebBrowser.Width = Me.ScaleWidth - 100
    brwWebBrowser.Height = Me.ScaleHeight - (picAddress.Top + picAddress.Height) - 100
End Sub
0
 
michaelairAuthor Commented:
thanx
then for the second one ....

0
 
clifABBCommented:
What second one?
0
All Courses

From novice to tech pro — start learning today.