diff --git a/ShiftOS/DockEngine.vb b/ShiftOS/DockEngine.vb
index 5c8721e..12dbf04 100644
--- a/ShiftOS/DockEngine.vb
+++ b/ShiftOS/DockEngine.vb
@@ -33,6 +33,7 @@
My.Computer.FileSystem.CreateDirectory(Application.StartupPath + "\SoftwareData\ShiftDock")
End If
System.IO.File.Create(filepath).Dispose()
+ DockWindow.firststart = True
End If
End If
diff --git a/ShiftOS/DockSettingsMenu.vb b/ShiftOS/DockSettingsMenu.vb
index 0bc8050..b3925b2 100644
--- a/ShiftOS/DockSettingsMenu.vb
+++ b/ShiftOS/DockSettingsMenu.vb
@@ -563,6 +563,7 @@
End Sub
Private Sub lblShiftNet_Click(sender As Object, e As EventArgs) Handles lblShiftNet.Click
+ pnlPrograms.Hide()
totile = lblShiftNet.Text
End Sub
diff --git a/ShiftOS/DockWindow.vb b/ShiftOS/DockWindow.vb
index af3e072..666abfe 100644
--- a/ShiftOS/DockWindow.vb
+++ b/ShiftOS/DockWindow.vb
@@ -7,6 +7,7 @@
Dim currenttile As String = 0
Public loadevents As New DockEngine
Public docktopbot As String = "Bottom"
+ Public firststart As Boolean
Public Sub colours()
'Dim img As New Bitmap(picBackColor.Width, picBackColor.Height)
@@ -46,6 +47,10 @@
loadevents.writeConfFile(Me.Top, docktopbot)
Me.Top = loadevents.docktop
docktopbot = loadevents.topbottom
+ If firststart = True Then
+ docktopbot = "Bottom"
+ Me.Top = screenHeight - Me.Height + 25
+ End If
If docktopbot = "Bottom" Then
'Me.Top = screenHeight - Me.Height - 42
Me.picBoarder.Top = 96
diff --git a/ShiftOS/Web Browser.Designer.vb b/ShiftOS/Web Browser.Designer.vb
index 0567459..aa2b2ce 100644
--- a/ShiftOS/Web Browser.Designer.vb
+++ b/ShiftOS/Web Browser.Designer.vb
@@ -38,6 +38,7 @@ Partial Class Web_Browser
Me.pgbottomlcorner = New System.Windows.Forms.Panel()
Me.pgcontents = New System.Windows.Forms.Panel()
Me.pnlwebtabholder = New System.Windows.Forms.Panel()
+ Me.tabs = New ShiftOS.ShiftOSTabs()
Me.Panel1 = New System.Windows.Forms.Panel()
Me.btnhome = New System.Windows.Forms.Button()
Me.txtlocation = New System.Windows.Forms.TextBox()
@@ -45,31 +46,21 @@ Partial Class Web_Browser
Me.btnback = New System.Windows.Forms.Button()
Me.Panel2 = New System.Windows.Forms.Panel()
Me.pnloptions = New System.Windows.Forms.Panel()
+ Me.btnRemTab = New System.Windows.Forms.Button()
+ Me.btnAddTab = New System.Windows.Forms.Button()
Me.siteloadprogress = New ShiftOS.ProgressBarEX()
- Me.pnltab4 = New System.Windows.Forms.Panel()
- Me.lbltab4 = New System.Windows.Forms.Label()
- Me.pnltab3 = New System.Windows.Forms.Panel()
- Me.lbltab3 = New System.Windows.Forms.Label()
- Me.pnltab2 = New System.Windows.Forms.Panel()
- Me.lbltab2 = New System.Windows.Forms.Label()
- Me.pnltab1 = New System.Windows.Forms.Panel()
- Me.lbltab1 = New System.Windows.Forms.Label()
Me.pgleft = New System.Windows.Forms.Panel()
Me.titlebar = New System.Windows.Forms.Panel()
Me.pnlicon = New System.Windows.Forms.PictureBox()
- Me.webwindowt1 = New Skybound.Gecko.GeckoWebBrowser()
- Me.webwindowt2 = New Skybound.Gecko.GeckoWebBrowser()
- Me.webwindowt3 = New Skybound.Gecko.GeckoWebBrowser()
- Me.webwindowt4 = New Skybound.Gecko.GeckoWebBrowser()
+ Me.TabText = New System.Windows.Forms.Timer(Me.components)
+ Me.UrlText = New System.Windows.Forms.Timer(Me.components)
+ Me.Progress = New System.Windows.Forms.Timer(Me.components)
+ Me.BrowserProgress = New ShiftOS.ProgressBarEX()
Me.pgright.SuspendLayout()
Me.pgcontents.SuspendLayout()
Me.pnlwebtabholder.SuspendLayout()
Me.Panel1.SuspendLayout()
Me.pnloptions.SuspendLayout()
- Me.pnltab4.SuspendLayout()
- Me.pnltab3.SuspendLayout()
- Me.pnltab2.SuspendLayout()
- Me.pnltab1.SuspendLayout()
Me.pgleft.SuspendLayout()
Me.titlebar.SuspendLayout()
CType(Me.pnlicon, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -191,16 +182,24 @@ Partial Class Web_Browser
'
'pnlwebtabholder
'
- Me.pnlwebtabholder.Controls.Add(Me.webwindowt4)
- Me.pnlwebtabholder.Controls.Add(Me.webwindowt3)
- Me.pnlwebtabholder.Controls.Add(Me.webwindowt2)
- Me.pnlwebtabholder.Controls.Add(Me.webwindowt1)
+ Me.pnlwebtabholder.Controls.Add(Me.tabs)
Me.pnlwebtabholder.Dock = System.Windows.Forms.DockStyle.Fill
Me.pnlwebtabholder.Location = New System.Drawing.Point(0, 36)
Me.pnlwebtabholder.Name = "pnlwebtabholder"
Me.pnlwebtabholder.Size = New System.Drawing.Size(1054, 487)
Me.pnlwebtabholder.TabIndex = 6
'
+ 'tabs
+ '
+ Me.tabs.Dock = System.Windows.Forms.DockStyle.Fill
+ Me.tabs.ItemSize = New System.Drawing.Size(120, 30)
+ Me.tabs.Location = New System.Drawing.Point(0, 0)
+ Me.tabs.Name = "tabs"
+ Me.tabs.SelectedIndex = 0
+ Me.tabs.Size = New System.Drawing.Size(1054, 487)
+ Me.tabs.SizeMode = System.Windows.Forms.TabSizeMode.Fixed
+ Me.tabs.TabIndex = 0
+ '
'Panel1
'
Me.Panel1.Controls.Add(Me.btnhome)
@@ -276,17 +275,36 @@ Partial Class Web_Browser
'
'pnloptions
'
+ Me.pnloptions.Controls.Add(Me.BrowserProgress)
+ Me.pnloptions.Controls.Add(Me.btnRemTab)
+ Me.pnloptions.Controls.Add(Me.btnAddTab)
Me.pnloptions.Controls.Add(Me.siteloadprogress)
- Me.pnloptions.Controls.Add(Me.pnltab4)
- Me.pnloptions.Controls.Add(Me.pnltab3)
- Me.pnloptions.Controls.Add(Me.pnltab2)
- Me.pnloptions.Controls.Add(Me.pnltab1)
Me.pnloptions.Dock = System.Windows.Forms.DockStyle.Bottom
Me.pnloptions.Location = New System.Drawing.Point(0, 523)
Me.pnloptions.Name = "pnloptions"
Me.pnloptions.Size = New System.Drawing.Size(1054, 45)
Me.pnloptions.TabIndex = 5
'
+ 'btnRemTab
+ '
+ Me.btnRemTab.FlatStyle = System.Windows.Forms.FlatStyle.Flat
+ Me.btnRemTab.Location = New System.Drawing.Point(93, 16)
+ Me.btnRemTab.Name = "btnRemTab"
+ Me.btnRemTab.Size = New System.Drawing.Size(81, 23)
+ Me.btnRemTab.TabIndex = 22
+ Me.btnRemTab.Text = "Remove Tab"
+ Me.btnRemTab.UseVisualStyleBackColor = True
+ '
+ 'btnAddTab
+ '
+ Me.btnAddTab.FlatStyle = System.Windows.Forms.FlatStyle.Flat
+ Me.btnAddTab.Location = New System.Drawing.Point(6, 16)
+ Me.btnAddTab.Name = "btnAddTab"
+ Me.btnAddTab.Size = New System.Drawing.Size(81, 23)
+ Me.btnAddTab.TabIndex = 21
+ Me.btnAddTab.Text = "Add Tab"
+ Me.btnAddTab.UseVisualStyleBackColor = True
+ '
'siteloadprogress
'
Me.siteloadprogress.BackColor = System.Drawing.Color.White
@@ -307,87 +325,6 @@ Partial Class Web_Browser
Me.siteloadprogress.TabIndex = 20
Me.siteloadprogress.Value = 0
'
- 'pnltab4
- '
- Me.pnltab4.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
- Me.pnltab4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
- Me.pnltab4.Controls.Add(Me.lbltab4)
- Me.pnltab4.Location = New System.Drawing.Point(513, 15)
- Me.pnltab4.Name = "pnltab4"
- Me.pnltab4.Size = New System.Drawing.Size(170, 26)
- Me.pnltab4.TabIndex = 19
- '
- 'lbltab4
- '
- Me.lbltab4.AutoSize = True
- Me.lbltab4.BackColor = System.Drawing.Color.Transparent
- Me.lbltab4.Location = New System.Drawing.Point(5, 7)
- Me.lbltab4.Name = "lbltab4"
- Me.lbltab4.Size = New System.Drawing.Size(56, 13)
- Me.lbltab4.TabIndex = 1
- Me.lbltab4.Text = "Blank Tab"
- '
- 'pnltab3
- '
- Me.pnltab3.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
- Me.pnltab3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
- Me.pnltab3.Controls.Add(Me.lbltab3)
- Me.pnltab3.Location = New System.Drawing.Point(344, 15)
- Me.pnltab3.Name = "pnltab3"
- Me.pnltab3.Size = New System.Drawing.Size(170, 26)
- Me.pnltab3.TabIndex = 18
- '
- 'lbltab3
- '
- Me.lbltab3.AutoSize = True
- Me.lbltab3.BackColor = System.Drawing.Color.Transparent
- Me.lbltab3.Location = New System.Drawing.Point(4, 7)
- Me.lbltab3.Name = "lbltab3"
- Me.lbltab3.Size = New System.Drawing.Size(56, 13)
- Me.lbltab3.TabIndex = 1
- Me.lbltab3.Text = "Blank Tab"
- '
- 'pnltab2
- '
- Me.pnltab2.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
- Me.pnltab2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
- Me.pnltab2.Controls.Add(Me.lbltab2)
- Me.pnltab2.Location = New System.Drawing.Point(175, 15)
- Me.pnltab2.Name = "pnltab2"
- Me.pnltab2.Size = New System.Drawing.Size(170, 26)
- Me.pnltab2.TabIndex = 17
- '
- 'lbltab2
- '
- Me.lbltab2.AutoSize = True
- Me.lbltab2.BackColor = System.Drawing.Color.Transparent
- Me.lbltab2.Location = New System.Drawing.Point(3, 7)
- Me.lbltab2.Name = "lbltab2"
- Me.lbltab2.Size = New System.Drawing.Size(56, 13)
- Me.lbltab2.TabIndex = 1
- Me.lbltab2.Text = "Blank Tab"
- '
- 'pnltab1
- '
- Me.pnltab1.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
- Me.pnltab1.BackColor = System.Drawing.SystemColors.ControlLight
- Me.pnltab1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
- Me.pnltab1.Controls.Add(Me.lbltab1)
- Me.pnltab1.Location = New System.Drawing.Point(6, 15)
- Me.pnltab1.Name = "pnltab1"
- Me.pnltab1.Size = New System.Drawing.Size(170, 26)
- Me.pnltab1.TabIndex = 16
- '
- 'lbltab1
- '
- Me.lbltab1.AutoSize = True
- Me.lbltab1.BackColor = System.Drawing.Color.Transparent
- Me.lbltab1.Location = New System.Drawing.Point(3, 7)
- Me.lbltab1.Name = "lbltab1"
- Me.lbltab1.Size = New System.Drawing.Size(56, 13)
- Me.lbltab1.TabIndex = 0
- Me.lbltab1.Text = "Blank Tab"
- '
'pgleft
'
Me.pgleft.BackColor = System.Drawing.Color.Gray
@@ -427,33 +364,36 @@ Partial Class Web_Browser
Me.pnlicon.TabStop = False
Me.pnlicon.Visible = False
'
- 'webwindowt1
+ 'TabText
'
- Me.webwindowt1.Location = New System.Drawing.Point(100, 62)
- Me.webwindowt1.Name = "webwindowt1"
- Me.webwindowt1.Size = New System.Drawing.Size(135, 84)
- Me.webwindowt1.TabIndex = 0
+ Me.TabText.Enabled = True
'
- 'webwindowt2
+ 'UrlText
'
- Me.webwindowt2.Location = New System.Drawing.Point(352, 122)
- Me.webwindowt2.Name = "webwindowt2"
- Me.webwindowt2.Size = New System.Drawing.Size(75, 23)
- Me.webwindowt2.TabIndex = 1
+ Me.UrlText.Enabled = True
'
- 'webwindowt3
+ 'Progress
'
- Me.webwindowt3.Location = New System.Drawing.Point(476, 122)
- Me.webwindowt3.Name = "webwindowt3"
- Me.webwindowt3.Size = New System.Drawing.Size(75, 23)
- Me.webwindowt3.TabIndex = 2
'
- 'webwindowt4
+ 'BrowserProgress
'
- Me.webwindowt4.Location = New System.Drawing.Point(218, 175)
- Me.webwindowt4.Name = "webwindowt4"
- Me.webwindowt4.Size = New System.Drawing.Size(75, 23)
- Me.webwindowt4.TabIndex = 3
+ Me.BrowserProgress.BackColor = System.Drawing.Color.Black
+ Me.BrowserProgress.BlockSeparation = 3
+ Me.BrowserProgress.BlockWidth = 5
+ Me.BrowserProgress.Color = System.Drawing.Color.Lime
+ Me.BrowserProgress.ForeColor = System.Drawing.SystemColors.ActiveCaption
+ Me.BrowserProgress.Location = New System.Drawing.Point(894, 16)
+ Me.BrowserProgress.MaxValue = 100
+ Me.BrowserProgress.MinValue = 0
+ Me.BrowserProgress.Name = "BrowserProgress"
+ Me.BrowserProgress.Orientation = ShiftOS.ProgressBarEX.ProgressBarOrientation.Horizontal
+ Me.BrowserProgress.ShowValue = True
+ Me.BrowserProgress.Size = New System.Drawing.Size(150, 23)
+ Me.BrowserProgress.Step = 10
+ Me.BrowserProgress.Style = ShiftOS.ProgressBarEX.ProgressBarExStyle.Blocks
+ Me.BrowserProgress.TabIndex = 23
+ Me.BrowserProgress.Value = 0
+ Me.BrowserProgress.Visible = False
'
'Web_Browser
'
@@ -476,14 +416,6 @@ Partial Class Web_Browser
Me.Panel1.ResumeLayout(False)
Me.Panel1.PerformLayout()
Me.pnloptions.ResumeLayout(False)
- Me.pnltab4.ResumeLayout(False)
- Me.pnltab4.PerformLayout()
- Me.pnltab3.ResumeLayout(False)
- Me.pnltab3.PerformLayout()
- Me.pnltab2.ResumeLayout(False)
- Me.pnltab2.PerformLayout()
- Me.pnltab1.ResumeLayout(False)
- Me.pnltab1.PerformLayout()
Me.pgleft.ResumeLayout(False)
Me.titlebar.ResumeLayout(False)
Me.titlebar.PerformLayout()
@@ -515,18 +447,13 @@ Partial Class Web_Browser
Friend WithEvents btnback As System.Windows.Forms.Button
Friend WithEvents Panel2 As System.Windows.Forms.Panel
Friend WithEvents pnloptions As System.Windows.Forms.Panel
- Friend WithEvents pnltab4 As System.Windows.Forms.Panel
- Friend WithEvents lbltab4 As System.Windows.Forms.Label
- Friend WithEvents pnltab3 As System.Windows.Forms.Panel
- Friend WithEvents lbltab3 As System.Windows.Forms.Label
- Friend WithEvents pnltab2 As System.Windows.Forms.Panel
- Friend WithEvents lbltab2 As System.Windows.Forms.Label
- Friend WithEvents pnltab1 As System.Windows.Forms.Panel
- Friend WithEvents lbltab1 As System.Windows.Forms.Label
Friend WithEvents pnlwebtabholder As System.Windows.Forms.Panel
Friend WithEvents siteloadprogress As ShiftOS.ProgressBarEX
- Friend WithEvents webwindowt4 As Skybound.Gecko.GeckoWebBrowser
- Friend WithEvents webwindowt3 As Skybound.Gecko.GeckoWebBrowser
- Friend WithEvents webwindowt2 As Skybound.Gecko.GeckoWebBrowser
- Friend WithEvents webwindowt1 As Skybound.Gecko.GeckoWebBrowser
+ Friend WithEvents tabs As ShiftOS.ShiftOSTabs
+ Friend WithEvents btnAddTab As System.Windows.Forms.Button
+ Friend WithEvents btnRemTab As System.Windows.Forms.Button
+ Friend WithEvents TabText As System.Windows.Forms.Timer
+ Friend WithEvents UrlText As System.Windows.Forms.Timer
+ Friend WithEvents BrowserProgress As ShiftOS.ProgressBarEX
+ Friend WithEvents Progress As System.Windows.Forms.Timer
End Class
diff --git a/ShiftOS/Web Browser.resx b/ShiftOS/Web Browser.resx
index b8db819..3013af3 100644
--- a/ShiftOS/Web Browser.resx
+++ b/ShiftOS/Web Browser.resx
@@ -126,4 +126,13 @@
195, 57
+
+ 308, 57
+
+
+ 397, 57
+
+
+ 487, 57
+
\ No newline at end of file
diff --git a/ShiftOS/Web Browser.vb b/ShiftOS/Web Browser.vb
index 6d163e7..49b2a6d 100644
--- a/ShiftOS/Web Browser.vb
+++ b/ShiftOS/Web Browser.vb
@@ -1,4 +1,6 @@
-Public Class Web_Browser
+Imports Skybound.Gecko
+
+Public Class Web_Browser
Public rolldownsize As Integer
Public oldbordersize As Integer
Public oldtitlebarheight As Integer
@@ -10,6 +12,7 @@
#Region "Template Code"
Private Sub Template_Load(sender As Object, e As EventArgs) Handles MyBase.Load
+
justopened = True
Me.Left = (Screen.PrimaryScreen.Bounds.Width - Me.Width) / 2
Me.Top = (Screen.PrimaryScreen.Bounds.Height - Me.Height) / 2
@@ -21,10 +24,11 @@
ShiftOSDesktop.setpanelbuttonappearnce(ShiftOSDesktop.pnlpanelbuttonwebbrowser, ShiftOSDesktop.tbwebbrowsericon, ShiftOSDesktop.tbwebbrowsertext, True) 'modify to proper name
ShiftOSDesktop.programsopen = ShiftOSDesktop.programsopen + 1
- gohome()
- webwindowt1.BringToFront()
- webwindowt1.Dock = DockStyle.Fill
- updatetabsizes()
+ addtab()
+
+ 'webwindowt1.BringToFront()
+ 'webwindowt1.Dock = DockStyle.Fill
+
End Sub
Public Sub setupall()
@@ -296,20 +300,20 @@
Private Sub pullside_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles pullside.Tick
Me.Width = Cursor.Position.X - Me.Location.X
resettitlebar()
- updatetabsizes()
+
End Sub
Private Sub pullbottom_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles pullbottom.Tick
Me.Height = Cursor.Position.Y - Me.Location.Y
resettitlebar()
- updatetabsizes()
+
End Sub
Private Sub pullbs_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles pullbs.Tick
Me.Width = Cursor.Position.X - Me.Location.X
Me.Height = Cursor.Position.Y - Me.Location.Y
resettitlebar()
- updatetabsizes()
+
End Sub
'delete this for non-resizable windows
@@ -430,228 +434,102 @@
'end of general setup
#End Region
- Dim currenttab As Integer = 1
- Dim oldlocationtxt As String
+ 'To re add gecko, replace all refrences to WebBrowser with Skybound.Gecko.GeckoWebBrowser. I would do it but i dont have the files!
- Private Sub txtlocation_KeyDown(sender As Object, e As KeyEventArgs) Handles txtlocation.KeyDown
- If e.KeyCode = Keys.Enter Then
- Select Case currenttab
- Case 1
- If txtlocation.Text.Contains(".") Then webwindowt1.Navigate(txtlocation.Text) Else webwindowt1.Navigate("http://www.google.com/search?q=" & txtlocation.Text)
- Case 2
- If txtlocation.Text.Contains(".") Then webwindowt2.Navigate(txtlocation.Text) Else webwindowt2.Navigate("http://www.google.com/search?q=" & txtlocation.Text)
- Case 3
- If txtlocation.Text.Contains(".") Then webwindowt3.Navigate(txtlocation.Text) Else webwindowt3.Navigate("http://www.google.com/search?q=" & txtlocation.Text)
- Case 4
- If txtlocation.Text.Contains(".") Then webwindowt4.Navigate(txtlocation.Text) Else webwindowt4.Navigate("http://www.google.com/search?q=" & txtlocation.Text)
- End Select
- End If
+ Public Sub addtab()
+ Dim tab As New TabPage
+ Dim brwsr As New WebBrowser 'NEEDS TO CHANGE TO GECKO OR WEBKIT
+ tabs.TabPages.Add(tab)
+ tab.Controls.Add(brwsr)
+ brwsr.Dock = DockStyle.Fill
+ tabs.SelectedTab = tab
+ brwsr.Navigate("http://www.google.com")
End Sub
- Private Sub webwindowt1_Navigated(sender As Object, e As WebBrowserNavigatedEventArgs)
- updatetitles()
- txtlocation.Text = webwindowt1.Url.ToString
- End Sub
- Private Sub webwindowt2_Navigated(sender As Object, e As WebBrowserNavigatedEventArgs)
- updatetitles()
- txtlocation.Text = webwindowt1.Url.ToString
- End Sub
- Private Sub webwindowt3_Navigated(sender As Object, e As WebBrowserNavigatedEventArgs)
- updatetitles()
- txtlocation.Text = webwindowt1.Url.ToString
- End Sub
- Private Sub webwindowt4_Navigated(sender As Object, e As WebBrowserNavigatedEventArgs)
- updatetitles()
- txtlocation.Text = webwindowt1.Url.ToString
+ Private Sub btnAddTab_Click(sender As Object, e As EventArgs) Handles btnAddTab.Click
+ addtab()
End Sub
- Private Sub updatetitles()
- Select Case currenttab
- Case 1
- If Not webwindowt1.DocumentTitle = "" Then lbltab1.Text = webwindowt1.DocumentTitle
- If webwindowt1.DocumentTitle = "" Then lbtitletext.Text = ShiftOSDesktop.webbrowsername Else lbtitletext.Text = ShiftOSDesktop.webbrowsername & " - " & webwindowt1.DocumentTitle
- centretitletext()
- pnltab1.BackColor = Color.FromName("ControlLight")
- pnltab2.BackColor = Color.White
- pnltab3.BackColor = Color.White
- pnltab4.BackColor = Color.White
- Case 2
- If Not webwindowt2.DocumentTitle = "" Then lbltab2.Text = webwindowt2.DocumentTitle
- If webwindowt2.DocumentTitle = "" Then lbtitletext.Text = ShiftOSDesktop.webbrowsername Else lbtitletext.Text = ShiftOSDesktop.webbrowsername & " - " & webwindowt2.DocumentTitle
- centretitletext()
- pnltab2.BackColor = Color.FromName("ControlLight")
- pnltab1.BackColor = Color.White
- pnltab3.BackColor = Color.White
- pnltab4.BackColor = Color.White
- Case 3
- If Not webwindowt3.DocumentTitle = "" Then lbltab3.Text = webwindowt3.DocumentTitle
- If webwindowt3.DocumentTitle = "" Then lbtitletext.Text = ShiftOSDesktop.webbrowsername Else lbtitletext.Text = ShiftOSDesktop.webbrowsername & " - " & webwindowt3.DocumentTitle
- centretitletext()
- pnltab3.BackColor = Color.FromName("ControlLight")
- pnltab2.BackColor = Color.White
- pnltab1.BackColor = Color.White
- pnltab4.BackColor = Color.White
- Case 4
- If Not webwindowt4.DocumentTitle = "" Then lbltab4.Text = webwindowt4.DocumentTitle
- If webwindowt4.DocumentTitle = "" Then lbtitletext.Text = ShiftOSDesktop.webbrowsername Else lbtitletext.Text = ShiftOSDesktop.webbrowsername & " - " & webwindowt4.DocumentTitle
- centretitletext()
- pnltab4.BackColor = Color.FromName("ControlLight")
- pnltab2.BackColor = Color.White
- pnltab3.BackColor = Color.White
- pnltab1.BackColor = Color.White
- End Select
- End Sub
-
- Private Sub centretitletext()
- If ShiftOSDesktop.boughttitletext = False Then
- lbtitletext.Hide()
- Else
- lbtitletext.Font = New Font(ShiftOSDesktop.titletextfont, ShiftOSDesktop.titletextsize, ShiftOSDesktop.titletextstyle)
- lbtitletext.Show()
- End If
-
- If ShiftOSDesktop.boughtwindowborders = True Then
- closebutton.Location = New Point(titlebar.Size.Width - ShiftOSDesktop.closebuttonside - closebutton.Size.Width, ShiftOSDesktop.closebuttontop)
- rollupbutton.Location = New Point(titlebar.Size.Width - ShiftOSDesktop.rollupbuttonside - rollupbutton.Size.Width, ShiftOSDesktop.rollupbuttontop)
- minimizebutton.Location = New Point(titlebar.Size.Width - ShiftOSDesktop.minimizebuttonside - minimizebutton.Size.Width, ShiftOSDesktop.minimizebuttontop)
- Select Case ShiftOSDesktop.titletextposition
- Case "Left"
- lbtitletext.Location = New Point(ShiftOSDesktop.titletextside, ShiftOSDesktop.titletexttop)
- Case "Centre"
- lbtitletext.Location = New Point((titlebar.Width / 2) - lbtitletext.Width / 2, ShiftOSDesktop.titletexttop)
- End Select
- lbtitletext.ForeColor = ShiftOSDesktop.titletextcolour
- Else
- closebutton.Location = New Point(titlebar.Size.Width - ShiftOSDesktop.closebuttonside - pgtoplcorner.Width - pgtoprcorner.Width - closebutton.Size.Width, ShiftOSDesktop.closebuttontop)
- rollupbutton.Location = New Point(titlebar.Size.Width - ShiftOSDesktop.rollupbuttonside - pgtoplcorner.Width - pgtoprcorner.Width - rollupbutton.Size.Width, ShiftOSDesktop.rollupbuttontop)
- minimizebutton.Location = New Point(titlebar.Size.Width - ShiftOSDesktop.minimizebuttonside - pgtoplcorner.Width - pgtoprcorner.Width - minimizebutton.Size.Width, ShiftOSDesktop.minimizebuttontop)
- Select Case ShiftOSDesktop.titletextposition
- Case "Left"
- lbtitletext.Location = New Point(ShiftOSDesktop.titletextside + pgtoplcorner.Width, ShiftOSDesktop.titletexttop)
- Case "Centre"
- lbtitletext.Location = New Point((titlebar.Width / 2) - lbtitletext.Width / 2, ShiftOSDesktop.titletexttop)
- End Select
- lbtitletext.ForeColor = ShiftOSDesktop.titletextcolour
- End If
+ Private Sub TabText_Tick(sender As Object, e As EventArgs) Handles TabText.Tick
+ For Each opentab As TabPage In tabs.TabPages
+ For Each browser As WebBrowser In opentab.Controls
+ opentab.Text = browser.DocumentTitle
+ Next
+ Next
End Sub
Private Sub btnback_Click(sender As Object, e As EventArgs) Handles btnback.Click
- Select Case currenttab
- Case 1
- If webwindowt1.CanGoBack = True Then webwindowt1.GoBack()
- Case 2
- If webwindowt2.CanGoBack = True Then webwindowt2.GoBack()
- Case 3
- If webwindowt3.CanGoBack = True Then webwindowt3.GoBack()
- Case 4
- If webwindowt4.CanGoBack = True Then webwindowt4.GoBack()
- End Select
- End Sub
-
- Private Sub btnforward_Click(sender As Object, e As EventArgs) Handles btnforward.Click
- Select Case currenttab
- Case 1
- If webwindowt1.CanGoForward = True Then webwindowt1.GoForward()
- Case 2
- If webwindowt2.CanGoForward = True Then webwindowt2.GoForward()
- Case 3
- If webwindowt3.CanGoForward = True Then webwindowt3.GoForward()
- Case 4
- If webwindowt4.CanGoForward = True Then webwindowt4.GoForward()
- End Select
- End Sub
-
- Private Sub gohome()
- Select Case currenttab
- Case 1
- webwindowt1.Navigate(ShiftOSDesktop.webbrowserhomepage)
- centretitletext()
- Case 2
- webwindowt2.Navigate(ShiftOSDesktop.webbrowserhomepage)
- centretitletext()
- Case 3
- webwindowt3.Navigate(ShiftOSDesktop.webbrowserhomepage)
- centretitletext()
- Case 4
- webwindowt4.Navigate(ShiftOSDesktop.webbrowserhomepage)
- centretitletext()
- End Select
-
- End Sub
-
- Private Sub btnhome_Click(sender As Object, e As EventArgs) Handles btnhome.Click
- gohome()
- End Sub
-
- Private Sub txtlocation_MouseClick(sender As Object, e As MouseEventArgs) Handles txtlocation.MouseClick
- txtlocation.SelectAll()
- End Sub
-
- Private Sub txtlocation_mouseenter(sender As Object, e As EventArgs) Handles txtlocation.GotFocus
- oldlocationtxt = txtlocation.Text
- txtlocation.Text = ""
- End Sub
- Private Sub txtlocation_mouseleave(sender As Object, e As EventArgs) Handles txtlocation.LostFocus
- If txtlocation.Text = "" Then txtlocation.Text = oldlocationtxt
- End Sub
-
- 'switching tabs
- Private Sub pnltab1_Click(sender As Object, e As EventArgs) Handles pnltab1.Click
- currenttab = 1
- webwindowt1.Dock = DockStyle.Fill
- webwindowt1.BringToFront()
- updatetitles()
- txtlocation.Text = "Search or Enter an address"
- If webwindowt1.DocumentTitle = "" Then lbtitletext.Text = "Web Browser" Else lbtitletext.Text = "Web Browser - " & webwindowt1.DocumentTitle
- End Sub
-
- Private Sub pnltab2_Click(sender As Object, e As EventArgs) Handles pnltab2.Click
- currenttab = 2
- webwindowt2.Dock = DockStyle.Fill
- webwindowt2.BringToFront()
- updatetitles()
- txtlocation.Text = "Search or Enter an address"
- If webwindowt2.DocumentTitle = "" Then lbtitletext.Text = "Web Browser" Else lbtitletext.Text = "Web Browser - " & webwindowt2.DocumentTitle
- End Sub
-
- Private Sub pnltab3_Click(sender As Object, e As EventArgs) Handles pnltab3.Click
- currenttab = 3
- webwindowt3.Dock = DockStyle.Fill
- webwindowt3.BringToFront()
- updatetitles()
- txtlocation.Text = "Search or Enter an address"
- If webwindowt3.DocumentTitle = "" Then lbtitletext.Text = "Web Browser" Else lbtitletext.Text = "Web Browser - " & webwindowt3.DocumentTitle
- End Sub
-
- Private Sub pnltab4_Click(sender As Object, e As EventArgs) Handles pnltab4.Click
- currenttab = 4
- webwindowt4.Dock = DockStyle.Fill
- webwindowt4.BringToFront()
- updatetitles()
- txtlocation.Text = "Search or Enter an address"
- If webwindowt4.DocumentTitle = "" Then lbtitletext.Text = "Web Browser" Else lbtitletext.Text = "Web Browser - " & webwindowt4.DocumentTitle
- End Sub
-
- Private Sub webloading(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserProgressChangedEventArgs)
Try
- If e.MaximumProgress > 0L AndAlso e.CurrentProgress > 0L Then
- siteloadprogress.Value = CInt(Math.Round((100 * e.CurrentProgress / e.MaximumProgress)))
- ElseIf e.MaximumProgress = 0L AndAlso e.CurrentProgress = 0L Then
- siteloadprogress.Value = 0
- End If
- Catch ex As Exception
- siteloadprogress.Value = 0
+ CType(tabs.SelectedTab.Controls.Item(0), WebBrowser).GoBack()
+ Catch
End Try
End Sub
- Private Sub updatetabsizes()
- Dim totalsize As Integer = Me.Width - pgleft.Width - pgright.Width - 10
- pnltab1.Size = New Size(totalsize / 4, pnltab1.Height)
- pnltab2.Size = New Size(totalsize / 4, pnltab2.Height)
- pnltab3.Size = New Size(totalsize / 4, pnltab3.Height)
- pnltab4.Size = New Size(totalsize / 4, pnltab4.Height)
- pnltab2.Location = New Point(pgleft.Width + 5 + pnltab1.Width, pnltab2.Location.Y)
- pnltab3.Location = New Point(pgleft.Width + 5 + pnltab1.Width + pnltab2.Width, pnltab3.Location.Y)
- pnltab4.Location = New Point(pgleft.Width + 5 + pnltab1.Width + pnltab2.Width + pnltab3.Width, pnltab4.Location.Y)
+ Private Sub UrlText_Tick(sender As Object, e As EventArgs) Handles UrlText.Tick
+ Try
+ txtlocation.Text = (CType(tabs.SelectedTab.Controls.Item(0), WebBrowser).Url.AbsoluteUri.ToString)
+ Catch
+ End Try
+ End Sub
+
+ Private Sub txtlocation_Click(sender As Object, e As EventArgs) Handles txtlocation.Click
+ txtlocation.Text = ""
+ UrlText.Stop()
+ End Sub
+
+ Private Sub txtlocation_LostFocus(sender As Object, e As EventArgs) Handles txtlocation.LostFocus
+ UrlText.Start()
+ End Sub
+
+ Private Sub btnforward_Click(sender As Object, e As EventArgs) Handles btnforward.Click
+ Try
+ CType(tabs.SelectedTab.Controls.Item(0), WebBrowser).GoForward()
+ Catch
+ End Try
+ End Sub
+
+ Private Sub btnhome_Click(sender As Object, e As EventArgs) Handles btnhome.Click
+ If tabs.TabCount > 1 Then
+ Try
+ CType(tabs.SelectedTab.Controls.Item(0), WebBrowser).Navigate("http://www.google.com")
+ Catch
+ End Try
+ Else
+ addtab()
+ Try
+ CType(tabs.SelectedTab.Controls.Item(0), WebBrowser).Navigate("http://www.google.com")
+ Catch
+ End Try
+ End If
+ End Sub
+
+ Private Sub Web_Browser_PreviewKeyDown(sender As Object, e As PreviewKeyDownEventArgs) Handles Me.PreviewKeyDown
+
+ End Sub
+
+ Private Sub txtlocation_PreviewKeyDown(sender As Object, e As PreviewKeyDownEventArgs) Handles txtlocation.PreviewKeyDown
+ If tabs.TabCount > 1 Then
+ If e.KeyCode = Keys.Enter Then
+ CType(tabs.SelectedTab.Controls.Item(0), WebBrowser).Navigate(txtlocation.Text)
+ End If
+ Else
+ If e.KeyCode = Keys.Enter Then
+ addtab()
+ CType(tabs.SelectedTab.Controls.Item(0), WebBrowser).Navigate(txtlocation.Text)
+ End If
+ End If
+ End Sub
+
+ Private Sub btnRemTab_Click(sender As Object, e As EventArgs) Handles btnRemTab.Click
+ If tabs.TabCount > 1 Then
+ tabs.Controls.Remove(tabs.SelectedTab)
+ Else
+ tabs.Controls.Remove(tabs.SelectedTab)
+ Me.Close()
+ End If
+ End Sub
+
+ Private Sub Progress_Tick(sender As Object, e As EventArgs) Handles Progress.Tick
+ 'BrowserProgress.MaxValue = (CType(tabs.SelectedTab.Controls.Item(0), WebBrowser)
End Sub
End Class
\ No newline at end of file