Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

VB5 internet browser bugs...

Posted on 1998-08-07
6
Medium Priority
?
164 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
  • 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

971 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