Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8038367
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T03:12:49+00:00 2026-06-05T03:12:49+00:00

I have built my own browser 9see attached code) however I would like to

  • 0

I have built my own browser 9see attached code) however I would like to modify the code so that textbox1 reads a txt file at start and uses the contents of that text file to navigate to a URL of equal value to the text with in that text file. All this should happen at the launch of the web browser form.

Example of the text file contents would be http://www.testsite.com

Code as follows:

    #Region "Webbrowser navigation"

    Private Sub Go()
        WebBrowser1.Navigate(TextBox1.Text)

    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
        Go()
    End Sub

    Private Sub TextBox1_keydown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown
        If e.KeyCode = Keys.Enter Then
            Go()
        End If
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        WebBrowser1.GoBack()
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        WebBrowser1.GoForward()
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        WebBrowser1.Stop()
    End Sub

#End Region

how can I best do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T03:12:50+00:00Added an answer on June 5, 2026 at 3:12 am

    In the event handler for the form’s Load event, do something like this:

    TextBox1.Text = File.ReadAllText("StartUrl.txt")
    Go()
    

    However, unless you have some good reason to use a text file, I would suggest something more flexible and standard such as XML. If you don’t mind using the standard app.config file, just add one of those to your project and you can use the ConfigurationManager class to read the setting.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to build my own RESTful API Server and I have no
I build a composite widget and would like it to have it's own accelerators
I have my own tiny blog that is built on top of Wordpress. I
We have built an online web app and would now like to package it
We have our own media player built in Javascript and I was wondering if
Need to use own imaged markers instead built-in pins. I have several questions. 1.
I have built UI, its like a search engine for BioProcess/Disease--> Genes. e.g., User
We have built a web application that accepts SOAP messages, does some processing, calls
I have a command-line application written in C++ and built with gcc/make that runs
I have built my own autocomplete/suggestion feature for my search box. It works fine

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.