Questions?

   HELLO! I AM NITESH MENON AND I HAVE SOME QUESTIONS. I HAVE BEEN USING VB FOR 3 DAYS AND NEED HELP.

QUESTION 1- When using a web browser is there a way to go back to the previous page in VB (like back in internet explorer)

QUESTION 2- When using a web browser is there a way to go back to the next page in VB (like forward in internet explorer)

QUESTION 3- How can I display another form other than the main one.

QUESTION 4- How do I save a configuration so when a user uses the program again he has the same settings.

QUESTION 5- How do I make a web browser the default one

QUESTION 6- How do I make an option menu.

QUESTION 7- How do I make the Text Box state the current webpage.

QUESTION 8- How do I open the program a 2nd time (like with the command new window)

THANKS Big SmileBig SmileBig Smile

P.S. Sorry for all the questions i'm 10 lol



Answer this question

Questions?

  • Romualdas

    Hi,

    Thats more of a Windows Setting. You ned to register your browser as the default one for the filetypes that your browser supports like .HTM and .HTML.

    Goto Windows Explorer. Select Tools and then Folder Options.
    Navigate to the to the FileTypes Tab. Find HTM under the Extensions column and click on Change and then Click on Browse and navigate to ur browser EXE in the installed location. Repeat the same for .HTML file extension.

    Also note that when Internet Explorer opens the next time, it prompts and asks if u want IE to be registered as the default browser for which u need to select No.


    Regards,
    Vikram

  • RStanton

    Hi Nitesh,

    I can send you a copy of the entire working solution (zipped) if you can send me ur email address.

    Regards,
    Vikram

  • Kingsley Tagbo

    Are you using Visual Studio .NET 2005, Visual Studio .NET 2003, or one of the Express Edition products

    This may be part of the problem.

  • Obble

    Thanks. The code won't work. It looks like Visual C++ or Visual C#. I use Visual BASIC. But where are the CanGoBack and CanGoForward Properties. I know where the CanGoBackChange and the CanGoForwardChange can be used. Can Someone Explain The GoBack(), GoForward(), and the System.Diagnostics.Process.Start() methods to me and also explain with example code how to display the current webpage. Sorry for the trouble SadSadSad Also the splash screen doesn't display the text my splash screen form does.
  • Yijing

     Nitesh Menon wrote:
     HELLO! I AM NITESH MENON AND I HAVE SOME QUESTIONS. I HAVE BEEN USING VB FOR 3 DAYS AND NEED HELP.


    Don't we all! Don't worry about asking. Its the reason for the forums :)

     Nitesh Menon wrote:
    QUESTION 1- When using a web browser is there a way to go back to the previous page in VB (like back in internet explorer)


    Yes, use the GoBack() method of the web browser control. Make sure the web browser's "CanGoBack" property is set to true.

     Nitesh Menon wrote:
    QUESTION 2- When using a web browser is there a way to go back to the next page in VB (like forward in internet explorer)


    Yes, similarly to GoBack(), use the GoForward() method of the web browser control. Make sure the web browser's "CanGoForward" property is set to true.

     Nitesh Menon wrote:
    QUESTION 3- How can I display another form other than the main one.


    Add a new form to the project, and then use syntax like:



    Dim form2 as new Form2
    form2.Show()

     


    Or to show one as a dialog box use:


    Dim form2 as new Form2
    form2.ShowDialog()

     



     Nitesh Menon wrote:
    QUESTION 4- How do I save a configuration so when a user uses the program again he has the same settings.


    This is a bit longer of an example. Try the following link for a starting point:
    http://msdn.microsoft.com/library/default.asp url=/library/en-us/dnvs05/html/vbmysettings.asp

     Nitesh Menon wrote:
    QUESTION 5- How do I make a web browser the default one


    I'm not sure by what you mean by this. If you mean, you want to write your "own" browser using the browser control and have it show up as the default internet explorer, this is a bit complex too, but will involve changing registry settings in:

    HKEY_CLASSES_ROOT\HTTP

    Try doing a search for this registry setting and you'll find more information.

     Nitesh Menon wrote:
    QUESTION 6- How do I make an option menu.

    Try adding a MenuStrip to your form.

     Nitesh Menon wrote:
    QUESTION 7- How do I make the Text Box state the current webpage.


    You'll need this to work both ways. You need your browser to navigate to what you type in a box, and then you need the box to display the new address if you redirect.  To do this use the Navigate() method of the browser control to navigate to the URL that someone types in a text box.  After this, add an event handler for the web browser control's "Navigated" event that reads the Url property of the web browser and sets the text to that value.

     Nitesh Menon wrote:
    QUESTION 8- How do I open the program a 2nd time (like with the command new window)


    Use the System.Diagnostics.Process.Start( ) method to execute a new window. If you set the default browser to your customized browser, you should be able to use the overloaded Start() method that takes a string, and pass in the value of the textbox that your Url is in. If you implemented the browser right, it will execute a new version of your browser with the location of your current window as the new version.

     Nitesh Menon wrote:
    THANKS Big SmileBig SmileBig Smile


    No problem.

     Nitesh Menon wrote:
    P.S. Sorry for all the questions i'm 10 lol


    Don't worry about the questions. Keep on plugging away. We will all be watching you and expect you to be a pro no later than the age of 13.


  • sou1_pure

    Hi,

    You can use the Timer component for displaying the splash screen. Once you add the Timer Control to your Splash Form, double click on the Timer control. In the event add the following code:


    private void timer1_Tick(object sender, EventArgs e)
      {
       timer1.Enabled = false;
       this.Close();
      }

     


    Also, in the Properties for the Timer, set the Interval Property to the value that you desire.

    Regards,
    Vikram



  • srii

    Nitesh, I would recommend that you start learning some of the fundamentals of programming.  You might want to consider looking at a few VB.NET tutorial sites.  LearnVisualStudio.NET is a great resource for new and intermediate developers alike.  That may help you to get past some of the problems you are currently having.  Additionaly, start looking at example code.  There is a web browser sample on windowsforms.net that allows you to get an idea of how to create a browser the way you want it to.  Here's a link:
    http://www.windowsforms.com/Default.aspx tabindex=4&tabid=49

    Look at the bottom of that link for the "Internet Explorer Clone".  It should help you get a pretty good start.   

  • zapacila89

    Sorry!SadSadSad The download works but the solution doesn't. How do i fix that

  • ShimonSim

    Never mind about GoBack and GoForward. I understand now. You don't just type GoBack or GoForward You Type WebBrowser1.GoBack and WebBrowser1.GoForward. I need help with the other things though!
  • dabro

    Big SmileBig SmileBig Smile Sorry but I have more questions. Where is the CanGoBack Propertie. Also when I use a SplashScreen it closes instantly. Can I initiate a timer And what I mean about displaying the current webpage is that when I click on a link in a google search the current webpage isn't displayed as it but as google.

    SOMEONE HELP SadSadSad

  • Paulo Aboim Pinto

    What I mean is that the solution doesn't even appear. It gives anerror message and doesn't load!


  • Regis St-Gelais

    My email adress is niteshsunjay@hotmail.com. I am using Visual Basic 2005 Express Edition Beta 2.
  • ScrappyDoo

    Hi Nitesh,

    The sample was built using .NET Framework 2.0 Beta 1 and hence does not compile in .NET Framework 2.0. Firstly, you will need to remove the references to the older DLLs and readd them based on Beta2.

    These are:
    ----------------------
    System
    System.Data
    System.Drawing
    System.Windows.Forms
    System.Xml
    ----------------------

    After adding these, if you run Build, the IDE will then list the Errors and Warnings. Comment the lines with Error where the SplitterWidth has been set. That should resolve the errors and enable you to compile the Solution. Ignore the warnings for now.

    Regards,
    Vikram

  • dead1

       What I mean by making it the default browser is that when I use e-mail on my web browser and click a link it opens in internet explorer. How do I make it open in my browser.
  • Questions?