Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

Help with little browser


  • Please log in to reply

#1
Machiavelli

Machiavelli

    GeekU Moderator

  • GeekU Moderator
  • 4,722 posts

Problem


I like to develope a little browser. I can access a site, I can also go to the last page I visited, but I have problems to access the next page button after I clicked on the "last page" button. (Example: You visit Google.com, then Machiavelliiscool.com and then mymotherissometimessilly.com. You wanna get back to Machaivelliiscool.com with clicking the last Page Button, but if I like to go back to the mymotherissometimessilly.com webpage I have to click on the next side button). And the next side button isn't working.


Codes


a) MainForm

Public Class Form1
    Public i As Integer = 1
    Dim j As Integer = 1
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Einstellungen.lstChronik.Items.Add(txtAdresse.Text)
        wb.Navigate(txtAdresse.Text)
    End Sub

    Private Sub cmdEinstellungen_Click(sender As Object, e As EventArgs) Handles cmdEinstellungen.Click
        Einstellungen.ShowDialog()
    End Sub

    Private Sub cmdRückwärts_Click(sender As Object, e As EventArgs) Handles cmdRückwärts.Click
        i = i + 1
        Try
            cmdVorwärts.Visible = True
            wb.Navigate(Einstellungen.lstChronik.Items(Einstellungen.lstChronik.Items.Count - i))
        Catch ex As Exception
        End Try
    End Sub

    Private Sub Button3_Click(sender As Object, e As EventArgs) Handles cmdVorwärts.Click
        wb.Navigate(Einstellungen.lstChronik.Items(Einstellungen.lstChronik.Items.Count - i + j))
    End Sub
End Class

Setting.vb (Windows Form):

<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class Einstellungen
    Inherits System.Windows.Forms.Form

    'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
    <System.Diagnostics.DebuggerNonUserCode()> _
    Protected Overrides Sub Dispose(ByVal disposing As Boolean)
        Try
            If disposing AndAlso components IsNot Nothing Then
                components.Dispose()
            End If
        Finally
            MyBase.Dispose(disposing)
        End Try
    End Sub

    'Wird vom Windows Form-Designer benötigt.
    Private components As System.ComponentModel.IContainer

    'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
    'Das Bearbeiten ist mit dem Windows Form-Designer möglich.  
    'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
    <System.Diagnostics.DebuggerStepThrough()> _
    Private Sub InitializeComponent()
        Me.tbctrl = New System.Windows.Forms.TabControl()
        Me.TabPage1 = New System.Windows.Forms.TabPage()
        Me.Button1 = New System.Windows.Forms.Button()
        Me.lstChronik = New System.Windows.Forms.ListBox()
        Me.TabPage2 = New System.Windows.Forms.TabPage()
        Me.tbctrl.SuspendLayout()
        Me.TabPage1.SuspendLayout()
        Me.SuspendLayout()
        '
        'tbctrl
        '
        Me.tbctrl.Controls.Add(Me.TabPage1)
        Me.tbctrl.Controls.Add(Me.TabPage2)
        Me.tbctrl.Location = New System.Drawing.Point(12, 12)
        Me.tbctrl.Name = "tbctrl"
        Me.tbctrl.SelectedIndex = 0
        Me.tbctrl.Size = New System.Drawing.Size(413, 372)
        Me.tbctrl.TabIndex = 0
        '
        'TabPage1
        '
        Me.TabPage1.Controls.Add(Me.Button1)
        Me.TabPage1.Controls.Add(Me.lstChronik)
        Me.TabPage1.Location = New System.Drawing.Point(4, 22)
        Me.TabPage1.Name = "TabPage1"
        Me.TabPage1.Padding = New System.Windows.Forms.Padding(3)
        Me.TabPage1.Size = New System.Drawing.Size(405, 346)
        Me.TabPage1.TabIndex = 0
        Me.TabPage1.Text = "Chronik"
        Me.TabPage1.UseVisualStyleBackColor = True
        '
        'Button1
        '
        Me.Button1.Location = New System.Drawing.Point(137, 283)
        Me.Button1.Name = "Button1"
        Me.Button1.Size = New System.Drawing.Size(75, 23)
        Me.Button1.TabIndex = 1
        Me.Button1.Text = "Go!"
        Me.Button1.UseVisualStyleBackColor = True
        '
        'lstChronik
        '
        Me.lstChronik.FormattingEnabled = True
        Me.lstChronik.Location = New System.Drawing.Point(23, 17)
        Me.lstChronik.Name = "lstChronik"
        Me.lstChronik.Size = New System.Drawing.Size(340, 238)
        Me.lstChronik.TabIndex = 0
        '
        'TabPage2
        '
        Me.TabPage2.Location = New System.Drawing.Point(4, 22)
        Me.TabPage2.Name = "TabPage2"
        Me.TabPage2.Padding = New System.Windows.Forms.Padding(3)
        Me.TabPage2.Size = New System.Drawing.Size(405, 346)
        Me.TabPage2.TabIndex = 1
        Me.TabPage2.Text = "Sicherheit"
        Me.TabPage2.UseVisualStyleBackColor = True
        '
        'Einstellungen
        '
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
        Me.ClientSize = New System.Drawing.Size(459, 407)
        Me.Controls.Add(Me.tbctrl)
        Me.Name = "Einstellungen"
        Me.Text = "Einstellungen"
        Me.tbctrl.ResumeLayout(False)
        Me.TabPage1.ResumeLayout(False)
        Me.ResumeLayout(False)

    End Sub
    Friend WithEvents tbctrl As System.Windows.Forms.TabControl
    Friend WithEvents TabPage1 As System.Windows.Forms.TabPage
    Friend WithEvents TabPage2 As System.Windows.Forms.TabPage
    Friend WithEvents lstChronik As System.Windows.Forms.ListBox
    Friend WithEvents Button1 As System.Windows.Forms.Button

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Form1.wb.Navigate(lstChronik.SelectedItem)
    End Sub
End Class


 

Do you need any more info ?
  • 0

Advertisements


#2
Machiavelli

Machiavelli

    GeekU Moderator

  • Topic Starter
  • GeekU Moderator
  • 4,722 posts
The problem is now solved.
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP