Solved

VB5 internet browser bugs...

Posted on 1998-08-07
6
160 Views
Last Modified: 2010-04-30
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..
0
Comment
Question by:michaelair
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 6

Expert Comment

by:clifABB
ID: 1468220
Does this error happen during developement mode?  If so, what is the line that it stops on?  (Click 'Debug' from the error box)
0
 

Author Comment

by:michaelair
ID: 1468221
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
 

Author Comment

by:michaelair
ID: 1468222
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 6

Accepted Solution

by:
clifABB earned 50 total points
ID: 1468223
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
 

Author Comment

by:michaelair
ID: 1468224
thanx
then for the second one ....

0
 
LVL 6

Expert Comment

by:clifABB
ID: 1468225
What second one?
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question