Solved

VB5 internet browser bugs...

Posted on 1998-08-07
6
156 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
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
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…

757 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now