Login Register






[VB.Net] [Source] TopLeft - Desktop utility filter_list
Author
Message
[VB.Net] [Source] TopLeft - Desktop utility #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]

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 Sub

Download Build 1.0 (303 Kb)
[Image: rytwG00.png]
Redcat Revolution!

Reply

RE: [VB.Net] [Source] TopLeft - Desktop utility #2
The RTM version is the latest one. And that came out in the start of August, available at first to MSDN subscribers. The first RTM one they had out is the only Retail one at this point in time, the others were all Previews. If you don't have the RTM one that came out in August, then you have one of the Previews, or you're misinformed.

I see this in there though:
Code:
CheckForIllegalCrossThreadCalls = False

Instead of telling you lol... http://msdn.microsoft.com/en-us/library/...calls.aspx
Quote:When a thread other than the creating thread of a control tries to access one of that control's methods or properties, it often leads to unpredictable results. A common invalid thread activity is a call on the wrong thread that accesses the control's Handle property. Set CheckForIllegalCrossThreadCalls to true to find and diagnose this thread activity more easily while debugging.

It's not meant to be a permanent solution Smile
ArkPhaze
"Object oriented way to get rich? Inheritance"
Getting Started: C/C++ | Common Mistakes
[ Assembly / C++ / .NET / Haskell / J Programmer ]

Reply

RE: [VB.Net] [Source] TopLeft - Desktop utility #3
(11-26-2012, 01:19 PM)ArkPhaze Wrote: The RTM version is the latest one. And that came out in the start of August, available at first to MSDN subscribers. The first RTM one they had out is the only Retail one at this point in time, the others were all Previews. If you don't have the RTM one that came out in August, then you have one of the Previews, or you're misinformed.

Quote:NEW YORK — Oct. 25, 2012 — Microsoft Corp. today announced the global availability of its popular Windows operating system, Windows 8. Beginning Friday, Oct. 26, consumers and businesses worldwide will be able to experience all that Windows 8 has to offer [...]

Source: Windows 8 Arrives - microsoft.com (Oct 25, 2012)

(11-26-2012, 01:19 PM)ArkPhaze Wrote: I see this in there though:
Code:
CheckForIllegalCrossThreadCalls = False

[...]
You saw that but you missed this
Code:
'Dim t As New Threading.Thread(AddressOf PointerCapture) 't.Start()

I was in fact debugging with multi-threading. That's why that lazy Me.tag usage also.
[Image: rytwG00.png]
Redcat Revolution!

Reply

RE: [VB.Net] [Source] TopLeft - Desktop utility #4
(11-26-2012, 06:32 PM)Coder-san Wrote:
(11-26-2012, 01:19 PM)ArkPhaze Wrote: The RTM version is the latest one. And that came out in the start of August, available at first to MSDN subscribers. The first RTM one they had out is the only Retail one at this point in time, the others were all Previews. If you don't have the RTM one that came out in August, then you have one of the Previews, or you're misinformed.

Quote:NEW YORK — Oct. 25, 2012 — Microsoft Corp. today announced the global availability of its popular Windows operating system, Windows 8. Beginning Friday, Oct. 26, consumers and businesses worldwide will be able to experience all that Windows 8 has to offer [...]

Source: Windows 8 Arrives - microsoft.com (Oct 25, 2012)

(11-26-2012, 01:19 PM)ArkPhaze Wrote: I see this in there though:
Code:
CheckForIllegalCrossThreadCalls = False

[...]
You saw that but you missed this
Code:
'Dim t As New Threading.Thread(AddressOf PointerCapture) 't.Start()

I was in fact debugging with multi-threading. That's why that lazy Me.tag usage also.

I didn't miss it, I just wondered why you'd post debug code instead of a finalized thing.

And yes I know the official version was released in October to everyone in public, but that exact same version was released to MSDN subscribers as early as Aug. 15th. I downloaded it on Aug. 16th, 2012. I am an MSDN subscriber... There is only one RTM version currently (one official release of Windows 8 that is not an alpha/beta or one of the previews).

Re-read what I posted:
Quote:The RTM version is the latest one. And that came out in the start of August, available at first to MSDN subscribers.

The ISO i've compared as my early downloaded setup file from my MSDN subscriber downloads, and the official release that was available in public October 25th--The file hashes match. There is zero difference.

You should read this: http://blogs.windows.com/windows/b/blogg...stone.aspx

It was available to my by August 15th, but I procrastinated to set it up until the day after.
ArkPhaze
"Object oriented way to get rich? Inheritance"
Getting Started: C/C++ | Common Mistakes
[ Assembly / C++ / .NET / Haskell / J Programmer ]

Reply

RE: [VB.Net] [Source] TopLeft - Desktop utility #5
I've tried all the versions, developer preview, consumer preview, release preview, RTM, and Retail. I admit I have not matched hashes, and yes I know both RTM and Retail are Build 9200 hence the exact same. I am not denying that, it's just a psychological belief of mine that Retail version is more stable than RTM.
What I can't understand is your purpose of coming to this topic, you have posted nothing which is on-topic yet.
[Image: rytwG00.png]
Redcat Revolution!

Reply

RE: [VB.Net] [Source] TopLeft - Desktop utility #6
RTM is the retail version, and that's where I think you have misunderstood things, not a big deal though. RTM means Release to manufacturer, thus it is NOT not a version in itself by definition, but can be used as reference to the first official build version for a particular OS version... To say that the retail version is more stable than the RTM is like saying you like red candies better than red candies; Retail can refer to RTM.

As for Windows 8, currently there is only one Retail version... Therefore when you reference the retail version of Windows 8 today, you can't be talking about anything else but the RTM release.

Here's another source you should look at: http://blogs.msdn.com/b/canthe/archive/2...32468.aspx

Nothing on topic? You didn't see my comment about CheckForIllegalCrossThreadCalls here? http://www.hackcommunity.com/Thread-VB-N...#pid103265

:oO:

I have no purpose for this whatsoever, so instead I provided feedback on the code itself.

If you wanted this to be more useful for others though, can I suggest that you provide the methods wrapped inside of a class to make it more OOP like? Right now to have someone try to incorporate your methods into their own program somehow or at least test things out, if you didn't have a download there, they would have to spend some time making sure all of the controls are there, and that the project in designer view.
ArkPhaze
"Object oriented way to get rich? Inheritance"
Getting Started: C/C++ | Common Mistakes
[ Assembly / C++ / .NET / Haskell / J Programmer ]

Reply

RE: [VB.Net] [Source] TopLeft - Desktop utility #7
Windows 8 is shit bro. It really is. Its biggest down fall will be you can only download content that microsoft allows. Meaning its horrible for hackers. Yes it may stay virus free. but for users like us. We cant do much with it.
[username], need some help?, PM me.
[Image: kjKks6Y.png]

Reply

RE: [VB.Net] [Source] TopLeft - Desktop utility #8
I like 8, at least much better than expected.

@ArkPhaze: I can go on with the offtopic conversation like you completely ignored my post except the last sentence where I wrote:
Quote:[...]and yes I know both RTM and Retail are Build 9200 hence the exact same. I am not denying that, it's just a psychological belief of mine that Retail version is more stable than RTM.[...]
But I won't because it's childish.

Your suggestion is very much welcome however. Even though this app is something made between an ongoing lecture as past-time, if I could find time for something new I'll try making it a class. Smile
[Image: rytwG00.png]
Redcat Revolution!

Reply

RE: [VB.Net] [Source] TopLeft - Desktop utility #9
It looks great I will try this . Thank you bro
[Image: OilyCostlyEwe.gif]

Reply

RE: [VB.Net] [Source] TopLeft - Desktop utility #10
It looks great I will try this . Thank you bro
[Image: OilyCostlyEwe.gif]

Reply