View Full Version : any one have any suggestions?
fireball****aka fireball_87
09-13-01, 03:35 PM
i wrote this little web browser in visual basic(some of you may remember that i posted it in genrel discioton a while ago) and was wondering if any one has any suggestions for improvements?(its still verry buggie)
silent bob
09-13-01, 05:59 PM
about the only thing that I dont like is it logs every page in your address bar other than that its pretty sweet I am still using it
thanks
steve
Hey, that's pretty neat! Very simple to use, I like it. Seems fast as hell too!
fireball****aka fireball_87
09-13-01, 08:01 PM
Originally posted by silent bob
about the only thing that I dont like is it logs every page in your address bar other than that its pretty sweet I am still using it
thanks
steve
i work on that! thanks. i may make a button to do that. still trying to fix the "starting page bug" :)
fireball****aka fireball_87
09-13-01, 08:02 PM
Originally posted by Monster of Rock
Hey, that's pretty neat! Very simple to use, I like it. Seems fast as hell too!
fast as hell :) thats what it was made to be :) i think i may call it "FAH web" :D
fireball****aka fireball_87
09-13-01, 08:05 PM
for anyone who dosent own visual basic, here is the sourse code for the actual browser:
Public StartingAddress As String
Dim mbDontNavigateNow As Boolean
Private Sub Form_Load()
On Error Resume Next
Me.Show
tbToolBar.Refresh
Form_Resize
cboAddress.Move 50, lblAddress.Top + lblAddress.Height + 15
If Len(StartingAddress) > 0 Then
cboAddress.Text = StartingAddress
cboAddress.AddItem cboAddress.Text
timTimer.Enabled = False
brwWebBrowser.Navigate StartingAddress
End If
End Sub
Private Sub brwWebBrowser_DownloadComplete()
On Error Resume Next
Me.Caption = brwWebBrowser.LocationName
End Sub
Private Sub brwWebBrowser_NavigateComplete2(ByVal pDisp As Object, URL As Variant)
On Error Resume Next
Dim i As Integer
Dim bFound As Boolean
Me.Caption = brwWebBrowser.LocationName
For i = 0 To cboAddress.ListCount - 1
If cboAddress.List(i) = brwWebBrowser.LocationURL Then
bFound = True
Exit For
End If
Next i
mbDontNavigateNow = True
If bFound Then
cboAddress.RemoveItem i
End If
cboAddress.AddItem brwWebBrowser.LocationURL, 0
cboAddress.ListIndex = 0
mbDontNavigateNow = False
End Sub
Private Sub cboAddress_Click()
If mbDontNavigateNow Then Exit Sub
timTimer.Enabled = True
brwWebBrowser.Navigate cboAddress.Text
End Sub
Private Sub cboAddress_KeyPress(KeyAscii As Integer)
On Error Resume Next
If KeyAscii = vbKeyReturn Then
cboAddress_Click
End If
End Sub
Private Sub Form_Resize()
On Error Resume Next
cboAddress.Width = Me.ScaleWidth - 100
brwWebBrowser.Width = Me.ScaleWidth - 100
brwWebBrowser.Height = Me.ScaleHeight - (picAddress.Top + picAddress.Height) - 100
End Sub
Private Sub print_Click()
On Error Resume Next
If ActiveForm Is Nothing Then Exit Sub
With dlgCommonDialog
.CancelError = True
.Flags = cdlPDReturnDC + cdlPDNoPageNums
If ActiveForm.rtfText.SelLength = 0 Then
.Flags = .Flags + cdlPDAllPages
Else
.Flags = .Flags + cdlPDSelection
End If
.ShowPrinter
If Err <> MSComDlg.cdlCancel Then
ActiveForm.rtfText.SelPrint .hDC
End If
End With
End Sub
Private Sub timTimer_Timer()
If brwWebBrowser.Busy = False Then
timTimer.Enabled = False
Me.Caption = brwWebBrowser.LocationName
Else
Me.Caption = "Loding..."
End If
End Sub
Private Sub tbToolBar_ButtonClick(ByVal Button As Button)
On Error Resume Next
timTimer.Enabled = True
Select Case Button.Key
Case "Back"
brwWebBrowser.GoBack
Case "Forward"
brwWebBrowser.GoForward
Case "Refresh"
brwWebBrowser.Refresh
Case "Home"
brwWebBrowser.GoHome
Case "Search"
brwWebBrowser.GoSearch
Case "Stop"
timTimer.Enabled = False
brwWebBrowser.Stop
Me.Caption = brwWebBrowser.LocationName
End Select
End Sub
and heres the sourse for the "base program":
Private Sub mnuViewStatusBar_Click()
mnuViewStatusBar.Checked = Not mnuViewStatusBar.Checked
sbStatusBar.Visible = mnuViewStatusBar.Checked
End Sub
Private Sub mnuViewToolbar_Click()
MsgBox "Add 'mnuViewToolbar_Click' code."
End Sub
Private Sub mnuFileExit_Click()
Unload Me
End Sub
Private Sub mnuFileSend_Click()
MsgBox "Add 'mnuFileSend_Click' code."
End Sub
Private Sub mnuFilePrint_Click()
On Error Resume Next
If ActiveForm Is Nothing Then Exit Sub
With dlgCommonDialog
.DialogTitle = "Print"
.CancelError = True
.Flags = cdlPDReturnDC + cdlPDNoPageNums
If ActiveForm.rtfText.SelLength = 0 Then
.Flags = .Flags + cdlPDAllPages
Else
.Flags = .Flags + cdlPDSelection
End If
.ShowPrinter
If Err <> MSComDlg.cdlCancel Then
ActiveForm.rtfText.SelPrint .hDC
End If
End With
End Sub
Private Sub mnuFilePrintPreview_Click()
MsgBox "Add 'mnuFilePrintPreview_Click' code."
End Sub
Private Sub mnuFilePageSetup_Click()
On Error Resume Next
With dlgCommonDialog
.DialogTitle = "Page Setup"
.CancelError = True
.ShowPrinter
End With
End Sub
Private Sub mnuFileProperties_Click()
MsgBox "Add 'mnuFileProperties_Click' code."
End Sub
Private Sub mnuFileSaveAll_Click()
MsgBox "Add 'mnuFileSaveAll_Click' code."
End Sub
Private Sub mnuFileSaveAs_Click()
Dim sFile As String
If ActiveForm Is Nothing Then Exit Sub
With dlgCommonDialog
.DialogTitle = "Save As"
.CancelError = False
.Filter = "All Files (*.*)|*.*"
.ShowSave
If Len(.FileName) = 0 Then
Exit Sub
End If
sFile = .FileName
End With
ActiveForm.Caption = sFile
ActiveForm.rtfText.SaveFile sFile
End Sub
Private Sub mnuFileSave_Click()
Dim sFile As String
If Left$(ActiveForm.Caption, 8) = "Document" Then
With dlgCommonDialog
.DialogTitle = "Save"
.CancelError = False
.Filter = "All Files (*.*)|*.*"
.ShowSave
If Len(.FileName) = 0 Then
Exit Sub
End If
sFile = .FileName
End With
ActiveForm.rtfText.SaveFile sFile
Else
sFile = ActiveForm.Caption
ActiveForm.rtfText.SaveFile sFile
End If
End Sub
Private Sub mnuFileClose_Click()
MsgBox "Add 'mnuFileClose_Click' code."
End Sub
Private Sub mnuFileOpen_Click()
Dim sFile As String
With dlgCommonDialog
.DialogTitle = "Open"
.CancelError = False
.Filter = "All Files (*.*)|*.*"
.ShowOpen
If Len(.FileName) = 0 Then
Exit Sub
End If
sFile = .FileName
End With
ActiveForm.rtfText.LoadFile sFile
ActiveForm.Caption = sFile
End Sub
and here the module sourse:
Public fBrowserForm As frmBrowser
Sub Main()
Set fBrowserForm = New frmBrowser
fBrowserForm.Show
End Sub
Only one problem so far. I cant open it in VB because you forgot to put the form and a module in the zip file.
The other thing I would change is to set the target of the search to another web page (unless of course you enjoy helping Microsoft get thousands of hits on thier MSN search page) I suggest something like google.
If you could post the full project, form, and any modules I would appreciate it, I am sure I have a sample of a browser around here somewhere but I would like to look at your code.
fireball****aka fireball_87
09-20-01, 01:38 PM
Originally posted by Gonzo
Only one problem so far. I cant open it in VB because you forgot to put the form and a module in the zip file.
The other thing I would change is to set the target of the search to another web page (unless of course you enjoy helping Microsoft get thousands of hits on thier MSN search page) I suggest something like google.
If you could post the full project, form, and any modules I would appreciate it, I am sure I have a sample of a browser around here somewhere but I would like to look at your code.
the code isnt all that to look at(i stole most of it from the sample browser) but ill try to post the entyre project, and change the ms thing :D
fireball****aka fireball_87
09-20-01, 01:46 PM
here it is. i think thats everything :) i still gota switch the search page.
fireball****aka fireball_87
09-20-01, 02:11 PM
almost there, started from scratch, but still got a few major bugs .
Not much code to look at, what are you smoking :D I like this program, I think I will spend some time on it over the weekend and customize it some, this has the potential to be my favorite browser with some customizing. I was thinking about making it a multipage browser, just put a tab index at the top and have multiple web browser windows attached to each tab index.
I didnt have a lot of time to learn all the code on this or look at it too much, but I made a few changes. I changed the text that appears when loading a web page, the browser wasnt going to the start page so I changed that, and I changed the default search engine.
There seems to be some errors when unloading the form, I think there is an argument where there should be a string value. I also think it would be good to maximize the child form on the load form event.
The program looks good though, it has lots of potential to be a really fun program. Once you get the bugs worked out start customizing it.
fireball****aka fireball_87
09-21-01, 01:40 PM
Originally posted by Gonzo
Not much code to look at, what are you smoking :D I like this program, I think I will spend some time on it over the weekend and customize it some, this has the potential to be my favorite browser with some customizing. I was thinking about making it a multipage browser, just put a tab index at the top and have multiple web browser windows attached to each tab index.
I didnt have a lot of time to learn all the code on this or look at it too much, but I made a few changes. I changed the text that appears when loading a web page, the browser wasnt going to the start page so I changed that, and I changed the default search engine.
There seems to be some errors when unloading the form, I think there is an argument where there should be a string value. I also think it would be good to maximize the child form on the load form event.
The program looks good though, it has lots of potential to be a really fun program. Once you get the bugs worked out start customizing it.
well the guy told me it was a joint, but........ :D
im gona try to work all the bugs out in verson 1.0, but for now heres 0.9 :D i havent had a chanbce to change it around muth(started over with the vb example) so it still closly resembels the vb example. just incase your wondering, the homepage is www.overclockers.com by defualt.
minoukat
09-21-01, 08:02 PM
Just a suggestion, try putting an "Help, About" screen, tell the version and ...
fireball****aka fireball_87
09-21-01, 09:12 PM
ok, heres version 0.9b :) a copple of nice new browser window arangement options now :)
fireball****aka fireball_87
09-23-01, 10:03 AM
bump!
I get an error when I try to run this on win98 worked fine on NT machine at work. The error says COMDLG32.OCX or dependencies missing or invalad.
Originally posted by Shep
I get an error when I try to run this on win98 worked fine on NT machine at work. The error says COMDLG32.OCX or dependencies missing or invalad.
Are you running the Exacutable or the code? That is interesting. The error is comming from the Common Dialog control, wich is an add in to VB.
I dont know much about application development yet, I am working on a program that uses Access 2000 libraries, and other controls that are only available from Visual Studio SP5. Maby there is someone out there that can enlighten us on how to deploy libraries that are used in the program to other users.
fireball****aka fireball_87
09-29-01, 09:46 AM
ok, cupple of updates. frogot to include the 0.9b .exe(the one in the zip is relly the 0.9), so ill attach that. you have to put boath the .OCX in c:\windows\system and c:\windows\system32
fireball****aka fireball_87
09-29-01, 09:47 AM
Originally posted by fireball****aka fireball_87
ok, cupple of updates. frogot to include the 0.9b .exe(the one in the zip is relly the 0.9), so ill attach that. you have to put boath the .OCX in c:\windows\system and c:\windows\system32
oops frogot to attach the file :D
minoukat
09-29-01, 09:12 PM
Tried version 9b, works good, just the print version doesn't work, and the "file/new" menu option doesn't make anything, so when you close the child window, you cannot open another ! Have to restart the app !
fireball****aka fireball_87
09-30-01, 11:01 AM
file new is just a leftover, i gota edit it out. no open a new browser go to view/web browser. or click the button :)
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.