473,761 Members | 1,764 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

help with making a web browser ( vb6)

20 New Member
i was wondering if there was a easy way of adding favorites , history and make it so my combobox updates went entering a new website on my web browser , code would be helpful and as i'm new for vb would be great of you to do a little explaining too (if possible) .

thanks for your help (using visual basic 6)
Feb 19 '08 #1
2 2367
jeffstl
432 Recognized Expert Contributor
I guess I would ask for a little more info. If you have a web browser built in vb6.0 I would imagine somewhere there is a variable holding the current URL for the page you are on.

Just grab that variable on every load of a page and write it to a text file for a history of pages visited. It will need to be a global variable too (so that all functions\subs can use it)

For a favorite make a command button or drop down command, that grabs that same variable (that holds the URL) except write to a seperate txt file for favorites.

For writing to txt file from VB6.0 you need to use the FSO (File System Object), and you will need this same control when you read from that text file to re-print your URLs. I would start there and see how it goes.

In the below code I am assuming that MyURLString is a variable declared and set at a upper level of code.
Dim MyURLString as String
MyURLString = (wherever this can be found in your code on a page load for the address bar)

'Code to get a favorite saved
Private Sub Command1_Click( )
'Declare variables.
Dim fso As New FileSystemObjec t
Dim ts As TextStream
'Open file.
Set ts = fso.OpenTextFil e("C:\Windows\M yFile.txt")
ts.Write(MyURLS tring)
'Close the file.
ts.Close
End Sub
Feb 19 '08 #2
ooroboo
20 New Member
I guess I would ask for a little more info. If you have a web browser built in vb6.0 I would imagine somewhere there is a variable holding the current URL for the page you are on.

Just grab that variable on every load of a page and write it to a text file for a history of pages visited. It will need to be a global variable too (so that all functions\subs can use it)

For a favorite make a command button or drop down command, that grabs that same variable (that holds the URL) except write to a seperate txt file for favorites.

For writing to txt file from VB6.0 you need to use the FSO (File System Object), and you will need this same control when you read from that text file to re-print your URLs. I would start there and see how it goes.

In the below code I am assuming that MyURLString is a variable declared and set at a upper level of code.
Dim MyURLString as String
MyURLString = (wherever this can be found in your code on a page load for the address bar)

'Code to get a favorite saved
Private Sub Command1_Click( )
'Declare variables.
Dim fso As New FileSystemObjec t
Dim ts As TextStream
'Open file.
Set ts = fso.OpenTextFil e("C:\Windows\M yFile.txt")
ts.Write(MyURLS tring)
'Close the file.
ts.Close
End Sub
thanks i'll trying working thought this , first day on vb tho so a little confusing but i'll work it out :) good answer
Feb 19 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

5
1255
by: Dawn | last post by:
I have a problem with my browser running Javascript. Using Netscape, I can run programs with Javascripts. Using IE, or if I open an HTML program with wordpad, the Javascript code will not execute. IE and wordpad used to work...now it doesn't. May of been caused by loading VB.net software which has since been
0
1986
by: max reason | last post by:
I added the WebBrowser component to my toolbox, then placed one on a form with other .NET components. This much seems to have worked, but I do not understand how to control the sucker from within my application. Specifically, what sort of syntax is involved to get the various interfaces (IHTMLWindow, IHTMLDocument3, etc) in the internal objects and call functions in them? What has worked is this:
1
1675
by: Shawn B. | last post by:
Greetings, I have have been working for almost 18 months on a set of WebControls where some are similar to the ASP.NET standard and well-enhanced while other controls are completely new and interesting. All my controls are implemented from scratch (in VB.NET). Some are C#, er I plan to have a second copy. I'm more productive in VB.NET (mainly because of the better intellisense support -- yes, I rely on it because I don't remember...
1
2844
by: john | last post by:
Hello, I am trying to convert a project from vb6 to vb.net. The code is a sample from an sdk for Canon digital camera's. I have gotten most of the issues resolved, but there are some that I am lacking knowledge in. I would appreciate any help give with this. The main errors have to deal with the VarPtr and AddressOf expression. Unfortunetly I do not have much experience with delegates. Below is some of the code. I can produce the entire...
0
914
by: Adrian Game | last post by:
I have been trying to update/upgrade the VB6 wave render project that can be found at
3
1239
by: Mufasa | last post by:
Can anybody suggest websites that talk about what you need to do to make an IE site also work under Firefox. What things are allowed and what aren't - that type of thing. TIA - Jeff.
4
1232
by: ooroboo | last post by:
i wont to make so the enter key can submit the url, like on firefox and IE , when i press enter it takes me to website i typed in instead of pressing the button , i had a few guesses but i'm new to vb and got it wrongh any help would be great If keyascii = Keys.enter Then WebBrowser1.Navigate(ComboBox1.Text) End if thanks
3
1243
by: Rory Becker | last post by:
The following code is being used in a VB6 program to read and write a simple binary file. I need to move things into the 21st century and recode this in VB.Net The new VB.Net program will need to continue to operate in the same enterprise level situation. Rollout will be slow and so for the moment the new code will have to be able to read and write these files in the exact same format as the Old VB6 code.
2
2539
Claus Mygind
by: Claus Mygind | last post by:
For my intranet web app we use exclusively FireFox as our browser. I have a report I want to format in the landscape mode and would like to include that code in the print button I display for the user. If it is possible could you please show some sample code?
0
9554
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9377
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9811
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8814
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6640
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5266
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5405
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3913
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2788
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.