Aero Visualization Thingi

Heres your chance to share your own tutorials with the community. Just post them on here. If your lucky they may even be posted on the main site.
3 posts Page 1 of 1
Contributors
User avatar
frozerlaxegon
Top Poster
Top Poster
Posts: 84
Joined: Thu May 13, 2010 4:38 pm

Aero Visualization Thingi
frozerlaxegon
I made this video myself, don't even think about copying it Bruce.
Self explanatory, Asian accent, what beats that?
Written tutorial originated from http://www.musicboxdotnet.blogspot.com < Another Frozer's Blog.

First, you guys need to download the required files :

1. BASS(.NET Wrapper, Original Lib)
2. VB.NET
3. VB6(Optional)
4. Time

Then, you guys follow the following steps :

1. Start VB.NET
2. Start a new project or open an existing one, add a reference to BASS.NET.DLL
3. Add the following code before Public Class
Imports Un4seen.Bass
Imports System.IO
Imports System.Runtime.InteropServices
4. Add the following code after Public Class
Dim P As DWMCOLORIZATIONPARAMS
Dim special As Long
Dim wdm_saved_color As Long
Dim wdm_is_on As Boolean
Dim strm As Integer
_
Private Shared Sub DwmSetColorization(ByRef dp As DWMCOLORIZATIONPARAMS, ByVal unknown As Long)
End Sub
_
Private Shared Sub DwmGetColorizationParameters(ByRef dp As DWMCOLORIZATIONPARAMS)
End Sub
Private Structure DWMCOLORIZATIONPARAMS
Public Color1 As Long
Public Color2 As Long
Public intensity As Long
Public Unknown1 As Long
Public Unknown2 As Long
Public Unknown3 As Long
Public Opaque As Long
End Structure
Public Sub rescolor()
On Error Resume Next
Dim w As New StreamWriter("StopAero.txt")
w.Close()
My.Computer.FileSystem.DeleteFile("StopAero.txt")
End Sub
Public Sub getcolor()
On Error Resume Next
Dim pProcess() As Process = System.Diagnostics.Process.GetProcessesByName("Aerolizer")
For Each p As Process In pProcess
p.Kill()
Next
DwmGetColorizationParameters(P)
special = Math.Sign(P.Color2) * (P.Color2 And &HFFFF0000)
wdm_saved_color = P.Color1 And P.Color2
wdm_is_on = True
Process.Start("Aerolizer.exe")
End Sub
Function LoWord(ByVal DWord As Long) As Integer
If DWord And &H8000& Then ' &H8000& = &H00008000
LoWord = DWord Or &HFFFF0000
Else
LoWord = DWord And &HFFFF&
End If
End Function

Function HiWord(ByVal DWord As Long) As Integer
HiWord = (DWord And &HFFFF0000) \ &H10000
End Function

Public Sub setcolor()
If wdm_is_on Then
Dim level As Long
Static prev As Long
level = Bass.BASS_ChannelGetLevel(strm)
level = ((HiWord(level) + LoWord(level)) / 2) \ 128
If level = 256 Then level = 255 'Cap it.
If level - prev > 50 Then level = prev + 50 Else If prev - level > 50 Then level = prev - 50 'Smoother.
If level <>
P.Color1 = special + RGB(0, 128 + level, level * 2)
Else
P.Color1 = special + RGB(0, 256 - (level - 127) * 2, 255)
End If
P.Color2 = P.Color1
DwmSetColorization(P, 0)
prev = level
End If
End Sub
5. Add two buttons* and one timer to your application
6. Name the first button "Enable Aero" and the second button "Disable Aero"
7. Set the timer interval between 10 and 50
8. Add setcolor() under timer_tick event
9. Add timer.enabled = true under the first button
10. Add the following code under the second button
Timer.Enabled = False
rescolor()
11. Save the project
12. Now, you need to create the helper application, click here for the code(VB6)
If your lazy, click here to download a compiled version.
13. After you have saved the project, there should be a folder
My Documents/Visual Studio 2008/Projects/(YourProjectNameHere)/
14. Inside that folder, add the files you have downloaded(bass.dll, Aerolizer.exe)
15. Add the following code under Form_Load
getcolor()
Bass.BASS_Init(-1, 44100, BASSInit.BASS_DEVICE_DEFAULT, IntPtr.Zero)
strm = Bass.BASS_StreamCreateFile("YourFileNameHere", 0,0 BASSFlags.BASS_Default)
Bass.BASS_ChannelPlay(strm, False)
16. Debug, have fun!
Last edited by frozerlaxegon on Sun Sep 05, 2010 3:26 am, edited 2 times in total.
You've been RICKROLL'D
User avatar
Agust1337
Coding God
Coding God
Posts: 2456
Joined: Fri Feb 19, 2010 8:18 pm

Re: Aero Visualization Thingi
Agust1337
Thanks, and I can beat it I kinda have a british accent :lol:
Top-notch casual Dating
User avatar
frozerlaxegon
Top Poster
Top Poster
Posts: 84
Joined: Thu May 13, 2010 4:38 pm

Re: Aero Visualization Thingi
frozerlaxegon
Agust1337 wrote:
Thanks, and I can beat it I kinda have a british accent :lol:
OMG Britishians, Im gonna kill myself right now OMG OMG OMG OMG OMG OMG
You've been RICKROLL'D
3 posts Page 1 of 1
Return to “Tutorials”