Solved

VB5 internet browser bugs...

Posted on 1998-08-07
6
157 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Window placement 17 74
Replace Formatted Numbers with text 9 61
Advice in Xamarin 21 47
MS Access 03, TransferText, decimal places 8 37
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

930 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

15 Experts available now in Live!

Get 1:1 Help Now