Its actually pretty easy, just follow and you guys should get it right...Or........you guys can watch the 7 minutes video below made by me using a blurred out mic and screen recorder(highly not recommended)
First, you guys need to download the required files :
- BASS(.NET Wrapper, Original Lib)
- VB.NET
- VB6(Optional)
- Time
- Start VB.NET
- Start a new project or open an existing one, add a reference to BASS.NET.DLL
- Add the following code before Public Class
Imports Un4seen.Bass
Imports System.IO
Imports System.Runtime.InteropServices - 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 - Add two buttons* and one timer to your application
- Name the first button "Enable Aero" and the second button "Disable Aero"
- Set the timer interval between 10 and 50
- Add setcolor() under timer_tick event
- Add timer.enabled = true under the first button
- Add the following code under the second button
Timer.Enabled = False
rescolor() - Save the project
- Now, you need to create the helper application, click here for the code(VB6)
If your lazy, click here to download a compiled version. - After you have saved the project, there should be a folder
My Documents/Visual Studio 2008/Projects/(YourProjectNameHere)/ - Inside that folder, add the files you have downloaded(bass.dll, Aerolizer.exe)
- 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) - Debug, have fun!
Hey man..
ReplyDeleteI followed all this.
But I continue to get errors on this part of the code:
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)
~~~~~~~~~~~~~~~~~~~~~~~~
Any Idea whats going on? I don't get what "YouFileNameHere" is... and your video is removed :(