Important alert: (current site time 7/16/2013 1:20:41 AM EDT)
 

VB icon

<1 Minute Web Browser!!!

Email
Submitted on: 2/20/1999
By: Peter Zhou  
Level: Not Given
User Rating: By 11 Users
Compatibility: VB 5.0, VB 6.0
Views: 121959
(About the author)
 
     You boss wants a webbrowser by 12, it's 11:59, just copy and paste this source and you'll get a cool looking black and white web browser in less than a minute!!!
 
code:
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.
				
'**************************************
' Name: <1 Minute Web Browser!!!
' Description:You boss wants a webbrowser by 12, it's 11:59, just copy and paste this source and you'll get a cool looking black and white web browser in less than a minute!!!
' By: Peter Zhou
'
' Assumes:Just create a file called Webfrm.frm in notepad and copy and paste the code in it and then start a project in VB and add the frm file in!!!
'
'This code is copyrighted and has' limited warranties.Please see http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=1417&lngWId=1'for details.'**************************************

*** paste into webfrm.frm in notepad after this line ***
VERSION 5.00
Object = "{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}#1.1#0"; "SHDOCVW.DLL"
Begin VB.Form Webfrm 
BackColor=&H00000000&
BorderStyle =3 'Fixed Dialog
Caption ="Web Browser"
ClientHeight=5295
ClientLeft =45
ClientTop=330
ClientWidth =7455
BeginProperty Font 
 Name="Tahoma"
 Size=8.25
 Charset =0
 Weight =400
 Underline=0'False
 Italic =0'False
 Strikethrough=0'False
EndProperty
LinkTopic="Form1"
MaxButton=0'False
MinButton=0'False
ScaleHeight =5295
ScaleWidth =7455
ShowInTaskbar=0'False
StartUpPosition =3 'Windows Default
Begin VB.ListBox lstFavs 
 Height =255
 Left=3960
 TabIndex=11
 Top =480
 Visible =0'False
 Width=1335
End
Begin VB.CommandButton cmdAdd 
 BackColor=&H80000005&
 Caption ="Add to Favorites"
 Height =255
 Left=6000
 Style=1 'Graphical
 TabIndex=10
 Top =840
 Width=1335
End
Begin VB.CommandButton cmdFav 
 BackColor=&H80000005&
 Caption ="Favorite"
 Height =255
 Left=4320
 Style=1 'Graphical
 TabIndex=9
 Top =120
 Width=735
End
Begin VB.CommandButton cmdSearch 
 BackColor=&H80000005&
 Caption ="Search"
 Height =255
 Left=5160
 Style=1 'Graphical
 TabIndex=8
 Top =120
 Width=735
End
Begin VB.CommandButton cmdForward 
 BackColor=&H80000005&
 Caption ="Forward"
 Height =255
 Left=960
 Style=1 'Graphical
 TabIndex=7
 Top =120
 Width=735
End
Begin VB.CommandButton cmdHome 
 BackColor=&H80000005&
 Caption ="Home"
 Height =255
 Left=3480
 Style=1 'Graphical
 TabIndex=6
 Top =120
 Width=735
End
Begin VB.CommandButton cmdReload 
 BackColor=&H80000005&
 Caption ="Reload"
 Height =255
 Left=2640
 Style=1 'Graphical
 TabIndex=5
 Top =120
 Width=735
End
Begin VB.CommandButton cmdStop 
 BackColor=&H80000005&
 Caption ="Stop"
 Height =255
 Left=1800
 Style=1 'Graphical
 TabIndex=4
 Top =120
 Width=735
End
Begin VB.CommandButton cmdBack 
 BackColor=&H80000005&
 Caption ="Back"
 Height =255
 Left=120
 Style=1 'Graphical
 TabIndex=3
 Top =120
 Width=735
End
Begin VB.ComboBox txtUrl 
 Height =315
 Left=720
 Style=1 'Simple Combo
 TabIndex=2
 Text="C:\"
 Top =840
 Width=5175
End
Begin SHDocVwCtl.WebBrowser WebBrowser1 
 Height =3975
 Left=120
 TabIndex=0
 Top =1200
 Width=7215
 ExtentX =12726
 ExtentY =7011
 ViewMode=1
 Offline =0
 Silent =0
 RegisterAsBrowser=0
 RegisterAsDropTarget=1
 AutoArrange =-1 'True
 NoClientEdge=0'False
 AlignLeft=0'False
 ViewID ="{0057D0E0-3573-11CF-AE69-08002B2E1262}"
 Location=""
End
Begin VB.Label Label1 
 BackColor=&H00000000&
 Caption ="Go To:"
 ForeColor=&H80000005&
 Height =255
 Left=120
 TabIndex=1
 Top =840
 Width=615
End
End
Attribute VB_Name = "Webfrm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim FN As Integer
Private Sub cmdAdd_Click()
FN = FreeFile
Open "c:\favs.txt" For Output As FN
Print #FN, txtUrl.Text & Chr(13)
Close #FN
End Sub
Private Sub cmdBack_Click()
On Error Resume Next
WebBrowser1.GoBack
End Sub
Private Sub cmdFav_Click()
On Error Resume Next
FN = FreeFile
Open "c:\favs.txt" For Input As FN
lstFavs.Visible = True
Do Until EOF(FN)
Line Input #FN, NextLine$
lstFavs.AddItem NextLine$
Loop
Close #FN
End Sub
Private Sub cmdForward_Click()
On Error Resume Next
WebBrowser1.GoForward
End Sub
Private Sub cmdHome_Click()
WebBrowser1.GoHome
End Sub
Private Sub cmdReload_Click()
WebBrowser1.Refresh
End Sub
Private Sub cmdSearch_Click()
WebBrowser1.GoSearch
End Sub
Private Sub cmdStop_Click()
WebBrowser1.Stop
End Sub
Private Sub Form_Load()
URL$ = "c:\"
WebBrowser1.Navigate URL$
End Sub
Private Sub lstFavs_Click()
txtUrl.Text = lstFavs.List(lstFavs.ListIndex)
txtUrl_KeyPress 13
lstFavs.Visible = False
Close #FN
End Sub
Private Sub txtUrl_KeyPress(KeyAscii As Integer)
On Error Resume Next
If KeyAscii = 13 Then
URL$ = txtUrl.Text
WebBrowser1.Navigate URL$
End If
End Sub


Other 3 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Not Given category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments
5/9/1999 6:57:00 PMHans Lemons

Change the "Open "c:\favs.txt" For Output As FN" to "Open c:\favs.txt" For Append As FN" so that it won't overwrite your "favorites" file every load.. also, change the "c:\favs.txt" to "favs.txt", which makes it stick in the app.path. It helped me a lot :)
(If this comment was disrespectful, please report it.)

 
1/19/2000 12:19:14 PMBrian

Ive created a custom web-browser application. When the app is running and a web page link is clicked, a new window will open with my default browser. How do I allow my browser to create another instance of itself and open the new window?
(If this comment was disrespectful, please report it.)

 
2/25/2000 4:52:56 PMMike

I can't get it to work! Help me please!
(If this comment was disrespectful, please report it.)

 
8/14/2000 7:33:53 AMDave

You haven't written a web-browser - you've simply used Internet Explorer to do it for you!
(If this comment was disrespectful, please report it.)

 
12/28/2000 6:17:08 AMTerrance Henry Shaw

AUGH!!! I couldn't get it done in one minute!!! MY BOSS FIRED ME!!!! AUGH!!! DUDE, YOU SAID IT WAS A LESS THAN ONE MINUTE BROWSER!!! NOOOOOOOOOOO!!!!
(If this comment was disrespectful, please report it.)

 
4/7/2001 6:56:38 PMDavid

try insert, form, web browser.

its already done 4 u.

thats less then 1/2 mins
(If this comment was disrespectful, please report it.)

 
8/6/2001 12:29:05 AMCrackHead

This would be good for those who want to add a browser to their own application..example would be an mp3 player with a browser window within the app like winamp, but better..any program would now have the browser embedded in it making any app more appealable and accessible. You could even make you app open the browser window directly to your page for program updates, news, etc...just my opinion on re-using existing technology. Its only as good as your imagination makes it...I thought this was pretty much intentional, thus making it possible to cusomze IE to your needs...I give it props, although VBasic five makes it easier to just drop it in during design stage, this could be re-worked to run in older version of vb...
(If this comment was disrespectful, please report it.)

 
4/11/2002 9:06:29 PMOrange Dinausor

interesting hmm hi all
(If this comment was disrespectful, please report it.)

 
6/4/2002 3:36:11 AMi_hate_vanness_wu

Gods. The program wouldn't work when I tried to run it. There were so many errors in it! Sighz......

And by the way, Vanness Wu of F4 is a chiobu.
(If this comment was disrespectful, please report it.)

 
9/6/2002 7:43:34 AM

Line 124: Class SHDocVwCtl.WebBrowser of control WebBrowser1 was not a loaded control class.
Line 130: The property name ExtentX in WebBrowser1 is invalid.
Line 131: The property name ExtentY in WebBrowser1 is invalid.
Line 132: The property name ViewMode in WebBrowser1 is invalid.
Line 133: The property name Offline in WebBrowser1 is invalid.
Line 134: The property name Silent in WebBrowser1 is invalid.
Line 135: The property name RegisterAsBrowser in WebBrowser1 is invalid.
Line 136: The property name RegisterAsDropTarget in WebBrowser1 is invalid.
Line 137: The property name AutoArrange in WebBrowser1 is invalid.
Line 138: The property name NoClientEdge in WebBrowser1 is invalid.
Line 139: The property name AlignLeft in WebBrowser1 is invalid.
Line 140: The property name ViewID in WebBrowser1 is invalid.
Line 141: The property name Location in WebBrowser1 is invalid.


Sorry...
(If this comment was disrespectful, please report it.)

 
9/6/2002 9:04:04 PMMeNoThere

did u add "microsoft internet controls" to your components list?
(If this comment was disrespectful, please report it.)

 
9/10/2002 8:37:52 PMThug-G

Hope ull get it in less than 1min cuz its its 11:59 and u need it for 12:00 u have 1sec :D
(If this comment was disrespectful, please report it.)

 
4/22/2003 7:58:22 PM

I have a problem in it but I was wondering if anyone has code for a real browser (not these IE based ones).
greg_gorrell@charter.net

(If this comment was disrespectful, please report it.)

 
11/6/2003 2:10:52 PMRick T

What libraries do i need to use the method: navigate?
(If this comment was disrespectful, please report it.)

 
12/14/2003 9:47:57 PMTucker Nance

I don't know how many times I have been in the situation where my boss wanted a web browser in 1 minutes...this code saved my life, and my marriage! ::: HAHAHHAHAHAH :::
(If this comment was disrespectful, please report it.)

 
12/16/2003 8:43:17 PMSIJO Soft.com

http://sijosoft.com/File/SSoft/Code/SSB.zip

try this one and know more about comand between page and application.
ie, you can order to the browser to shutdown the sytem from an html page.
and more facilitues
(If this comment was disrespectful, please report it.)

 
1/15/2004 5:09:52 AMkak

A seriously doubtful situation
(If this comment was disrespectful, please report it.)

 
2/8/2004 6:26:30 PM

in some cases using ie for the browser is fine..like when you add a bunch of features for your own uses or whatever, but in this case its just a browser...seems pointless is all.Interesting idea though...
(If this comment was disrespectful, please report it.)

 
7/20/2004 9:55:05 PM

would be good if some people could use the correct code rather than something basic that gives errors for everyone else to get frustrated over. This code annoyed the hell out of me.
(If this comment was disrespectful, please report it.)

 
7/29/2004 7:47:30 AM

This is a simple web-browser, yet the code is thrown together sloppily.
I'll make one, and upload it. ;-)
(If this comment was disrespectful, please report it.)

 
8/7/2004 3:22:48 PM

tell ur boss to double click the internet explorer icon on the desktop. thats a real browser in just a second.
(If this comment was disrespectful, please report it.)

 
10/12/2004 8:11:27 AM

you saved my job! :)
(If this comment was disrespectful, please report it.)

 
11/1/2004 3:59:05 AMRyan27

i have a basic browser, its IE based but it shows u how ez it is to make one, take a look at: http://planetsourcecode.com/vb/scripts/BrowseCategoryOrSearchResults.asp?lngWId=1&blnAut horSearch=TRUE&lngAuthorId=1957888088&strAuthorName=Ryan27&txtMaxNumberOfEntriesPerPage=25
(If this comment was disrespectful, please report it.)

 
11/1/2004 3:59:55 AMRyan27

http://planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=57038&lngWId=1
(If this comment was disrespectful, please report it.)

 
12/5/2004 3:27:24 PM

why don't you put it in a zip format.. that way it will be easier to work with the code.
(If this comment was disrespectful, please report it.)

 
1/29/2005 9:32:44 PM

Worked great for me...
needed some code to add to my browser and it helped..

Thanks a lot!
(If this comment was disrespectful, please report it.)

 
6/26/2005 3:47:44 PM

please someone help me, i cant get it done, if anyone has made it please send it to me.
ahmadbashiri@gmail.com
thanks
(If this comment was disrespectful, please report it.)

 
8/9/2005 3:04:41 AMMad

1 Minute Web Browser Favorite button doesnt work ho can i get it working
(If this comment was disrespectful, please report it.)

 
8/2/2007 5:43:25 AMserwan

tankyou
(If this comment was disrespectful, please report it.)

 
3/31/2008 12:44:26 PMmark

imposible
(If this comment was disrespectful, please report it.)

 
12/8/2008 12:09:41 AM

web

(If this comment was disrespectful, please report it.)

 
12/19/2008 9:26:54 AMJhon...

Dude...
This is nothing but only just
booring
+nasting
+timepass
and nothing else
pls put the zip file of above code for make it within 60sec.....
(If this comment was disrespectful, please report it.)

 
12/10/2009 6:16:56 PMNasser

very nice web browser
thanks alot
(If this comment was disrespectful, please report it.)

 
3/24/2012 5:59:00 PMKazi Nishat

Not Run
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.