[VB.Net] [Source] TopLeft - Desktop utility 11-19-2012, 04:28 PM
#1
Hi, it's been a very long time since I made a new thread at HC.
I'm delighted with the Windows 8 64-bit Retail (which came out a few weeks back, not the RTM one), but I wanted something more out of the top-left corner so I made it myself.
![[Image: iRrMvUTAPdGH9.jpg]](http://i.minus.com/iRrMvUTAPdGH9.jpg)
It's neither super-pretty nor optimized (uses 6.1MB of RAM), but I use it so I thought about giving the source.
I made it using an extra thread also, but I prefer the timer version.
Here is the source:
Download Build 1.0 (303 Kb)
I'm delighted with the Windows 8 64-bit Retail (which came out a few weeks back, not the RTM one), but I wanted something more out of the top-left corner so I made it myself.
![[Image: iRrMvUTAPdGH9.jpg]](http://i.minus.com/iRrMvUTAPdGH9.jpg)
It's neither super-pretty nor optimized (uses 6.1MB of RAM), but I use it so I thought about giving the source.
I made it using an extra thread also, but I prefer the timer version.
Here is the source:
Code:
Private Sub frmMain_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Me.Hide()
Me.Width = 120
Me.Location = New Point(0, 0)
Me.Height = Screen.PrimaryScreen.WorkingArea.Height
listMain.BackColor = Me.BackColor
LoadDrives()
'Dim t As New Threading.Thread(AddressOf PointerCapture)
't.Start()
'timMain.Stop()
End Sub
Private Sub PointerCapture()
CheckForIllegalCrossThreadCalls = False
Do While Me.Tag = 1
LoadDrives()
If MousePosition = New Point(0, 0) Then
Me.Show()
Activate()
ElseIf MousePosition.X >= Me.Width + 1 Then
Me.Hide()
End If
Threading.Thread.Sleep(500)
Loop
End Sub
Private Sub LoadDrives()
Try
With listMain.Items
.Clear()
For intI As Integer = 0 To My.Computer.FileSystem.Drives.Count - 1
Dim drv As IO.DriveInfo = My.Computer.FileSystem.Drives.Item(intI)
If Environment.SystemDirectory.Contains(drv.Name) Then
.Add(drv.VolumeLabel & " (" & drv.Name.Substring(0, 2) & ")", 0) 'Windows partition
Else
If drv.IsReady Then
.Add(drv.VolumeLabel & " (" & drv.Name.Substring(0, 2) & ")", 1) 'Common partition
Else
.Add(drv.Name.Substring(0, 2), 1)
End If
listMain.Items.Item(listMain.Items.Count - 1).Tag = drv.Name
End If
Next
End With
Exit Sub
Catch ex As Exception
End Try
End Sub
Private Sub listMain_MouseUp(sender As Object, e As MouseEventArgs) Handles listMain.MouseUp
If listMain.SelectedItems.Count = 1 Then Process.Start("explorer.exe", listMain.SelectedItems(0).Tag.ToString)
End Sub
Private Sub ExitToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ExitToolStripMenuItem.Click
Me.Tag = 0
timMain.Stop()
notify.Dispose()
Me.Close()
End Sub
Private Sub AboutTopLeftV10ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles AboutTopLeftV10ToolStripMenuItem.Click
MessageBox.Show(Application.ProductName & Application.ProductVersion & vbCrLf & New String("_", 72) & vbCrLf & vbCrLf & "Makes the not-so-used ""Top-left"" corner more usable in Windows 8" & vbCrLf & New String("_", 72) & vbCrLf & vbCrLf & Application.CompanyName)
End Sub
Private Sub Dismiss()
For Each itm As ListViewItem In listMain.SelectedItems
itm.Selected = False
Next
Me.Hide()
End Sub
Private Sub timMain_Tick(sender As Object, e As EventArgs) Handles timMain.Tick
LoadDrives()
If MousePosition = New Point(0, 0) Then
Me.Show()
Activate()
ElseIf MousePosition.X >= Me.Width + 1 Then
Me.Hide()
End If
End SubDownload Build 1.0 (303 Kb)
![[Image: rytwG00.png]](http://i.imgur.com/rytwG00.png)
Redcat Revolution!





![[+]](https://sinister.li/images/modern/collapse_collapsed.png)


![[Image: kjKks6Y.png]](http://i.imgur.com/kjKks6Y.png)
![[Image: OilyCostlyEwe.gif]](http://fat.gfycat.com/OilyCostlyEwe.gif)