Results 1 to 12 of 12
  1. #1
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed

    [TuT]TaskBar Manipulation

    Taskbar Manipulation

    As always , Open VB.net and create a new project, follow along.

    First, Add 7 Buttons and 1 Texbox to your form

    Change button text to something like

    * Hide Start
    * Show Start
    * Hide Clock
    * Show Clock
    * Disable Taskbar
    * Disable Taskbar
    * Change Start Menu Text

    You should now have something that looks like this



    Now for the code part

    First thing you need is this code

    Code:
        Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As IntPtr
        Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As IntPtr, ByVal hWnd2 As IntPtr, ByVal lpsz1 As String, ByVal lpsz2 As String) As IntPtr
        Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As IntPtr, ByVal nCmdShow As Integer) As IntPtr
        Private Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" (ByVal hWnd As IntPtr, ByVal lpString As String) As Boolean
        Private Declare Function EnableWindow Lib "user32" (ByVal hWnd As IntPtr, ByVal bEnable As Boolean) As Integer
        Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hWnd As IntPtr, ByVal lpString As String, ByVal nMaxCount As Integer) As Integer
        Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As IntPtr, ByVal wMsg As Integer, ByVal wParam As Integer, ByVal lParam As Integer) As Integer
        Private Const WM_LBUTTONDOWN As Integer = &H201
        Private Const WM_LBUTTONUP As Integer = &H202
        Private Const SW_HIDE As Integer = 0
        Private Const SW_SHOW As Integer = 5
        Private Const SW_MINIMIZE As Integer = 6
        Private Const SW_MAXIMIZE As Integer = 3
        Private Const SW_RESTORE As Integer = 9
    
        Public Shared Sub PopupStartMenu()
            Dim Taskb As IntPtr = FindWindow("Shell_TrayWnd", Nothing)
            Dim StartMenu As IntPtr = FindWindowEx(Taskb, IntPtr.Zero, "Button", Nothing)
            SendMessage(StartMenu, WM_LBUTTONDOWN, 0, 0)
            SendMessage(StartMenu, WM_LBUTTONUP, 0, 0)
        End Sub
    
        Public Shared Sub CloseStartMenu()
        End Sub
    
        Public Shared Sub ShowStartButton()
            Dim Taskb As IntPtr = FindWindow("Shell_TrayWnd", Nothing)
            Dim StartMenu As IntPtr = FindWindowEx(Taskb, IntPtr.Zero, "Button", Nothing)
            ShowWindow(StartMenu, SW_SHOW)
        End Sub
    
        Public Shared Sub HideStartButton()
            Dim Taskb As IntPtr = FindWindow("Shell_TrayWnd", Nothing)
            Dim StartMenu As IntPtr = FindWindowEx(Taskb, IntPtr.Zero, "Button", Nothing)
            ShowWindow(StartMenu, SW_HIDE)
        End Sub
    
        Public Shared Sub ShowClock()
            Dim Taskb As IntPtr = FindWindow("Shell_TrayWnd", Nothing)
            Dim Systray As IntPtr = FindWindowEx(Taskb, IntPtr.Zero, "TrayNotifyWnd", Nothing)
            Dim Clock As IntPtr = FindWindowEx(Systray, IntPtr.Zero, "TrayClockWClass", Nothing)
            ShowWindow(Clock, SW_SHOW)
        End Sub
    
        Public Shared Sub HideClock()
            Dim Taskb As IntPtr = FindWindow("Shell_TrayWnd", vbNullString)
            Dim Systray As IntPtr = FindWindowEx(Taskb, IntPtr.Zero, "TrayNotifyWnd", Nothing)
            Dim Clock As IntPtr = FindWindowEx(Systray, IntPtr.Zero, "TrayClockWClass", vbNullString)
            ShowWindow(Clock, SW_HIDE)
        End Sub
    
        Public Shared Property StartMenuText() As String
            Get
                Dim Taskb As IntPtr = FindWindow("Shell_TrayWnd", Nothing)
                Dim StartMenu As IntPtr = FindWindowEx(Taskb, IntPtr.Zero, "Button", Nothing)
                Dim WindowText As String = Space(256)
                GetWindowText(StartMenu, WindowText, Len(WindowText))
                WindowText = WindowText.Trim
                WindowText = WindowText.Substring(0, WindowText.Length - 1)
                Return WindowText
            End Get
            Set(ByVal Value As String)
                Dim Taskb As IntPtr = FindWindow("Shell_TrayWnd", Nothing)
                Dim StartMenu As IntPtr = FindWindowEx(Taskb, IntPtr.Zero, "Button", Nothing)
                SetWindowText(StartMenu, Value)
                EnableWindow(StartMenu, False)
                EnableWindow(StartMenu, True)
            End Set
        End Property
    
        Public Shared Sub DisableTaskbar()
            Dim Taskb As IntPtr
            Taskb = FindWindow("Shell_TrayWnd", Nothing)
            Call EnableWindow(Taskb, False)
        End Sub
    
        Public Shared Sub EnableTaskbar()
            Dim Taskb As IntPtr
            Taskb = FindWindow("Shell_TrayWnd", Nothing)
            Call EnableWindow(Taskb, True)
        End Sub
    To hide the Start Menu, You need this code

    Code:
     HideStartButton()
    To Show the Start Menu, You need this code

    Code:
     ShowStartButton()

    To hide the Clock, You need this code

    Code:
     HideClock()

    To Show the Clock, You need this code

    Code:
    ShowClock()

    To Disable the Taskb, You need this code

    Code:
    DisableTaskbar()

    To Enable the Taskb, You need this code
    Code:
     DisableTaskbar()

    Finally,

    To Change the Start Button Text, You need this code
    Code:
     StartButtonText = TextBox1.Text
    Hope this helps


     


     


     



    The Most complete application MPGH will ever offer - 68%




  2. The Following 5 Users Say Thank You to NextGen1 For This Useful Post:

    Blubb1337 (02-04-2010),FlashDrive (02-04-2010),martijno0o0 (02-04-2010),mnpeepno2 (02-04-2010),Zoom (02-04-2010)

  3. #2
    Lolland's Avatar
    Join Date
    Feb 2009
    Gender
    male
    Location
    Lolland!
    Posts
    3,156
    Reputation
    49
    Thanks
    868
    My Mood
    Inspired
    Good job, but I find this useless.

    When the time comes, however.

  4. #3
    mnpeepno2's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    In a barren wasteland
    Posts
    905
    Reputation
    10
    Thanks
    81
    hmmm, maybe add into my windows spammer!
    /THANKED


    -----------------------------------------------

    My site: here
    My Blog: here
    My member's area: here
    Minecraft Sever Forum: here


    Minecraft Servers:

    Public:



    Private:



  5. #4
    Lolland's Avatar
    Join Date
    Feb 2009
    Gender
    male
    Location
    Lolland!
    Posts
    3,156
    Reputation
    49
    Thanks
    868
    My Mood
    Inspired
    What would be the use of this in your project

    It doesn't really have much of a use I can think of.

  6. #5
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Just more for learning, I will never need this, but good to know that I can


     


     


     



    The Most complete application MPGH will ever offer - 68%




  7. #6
    mnpeepno2's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    In a barren wasteland
    Posts
    905
    Reputation
    10
    Thanks
    81
    fuck up the settings





















































































































































































































































































































































































































































































































































































































































































































































    EDIT:
    Do you need to run as admin?


    -----------------------------------------------

    My site: here
    My Blog: here
    My member's area: here
    Minecraft Sever Forum: here


    Minecraft Servers:

    Public:



    Private:



  8. #7
    mnpeepno2's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    In a barren wasteland
    Posts
    905
    Reputation
    10
    Thanks
    81
    ^mod edit, its fucked.


    -----------------------------------------------

    My site: here
    My Blog: here
    My member's area: here
    Minecraft Sever Forum: here


    Minecraft Servers:

    Public:



    Private:



  9. #8
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Still no need to double post , PM why06 next time

    Ontopic,

    You could Use my regedit tut and make a windows XP tweak tool (with these)
    Last edited by NextGen1; 02-04-2010 at 07:22 AM.


     


     


     



    The Most complete application MPGH will ever offer - 68%




  10. #9
    martijno0o0's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Posts
    242
    Reputation
    10
    Thanks
    11
    My Mood
    Stressed
    nice

  11. #10
    Zoom's Avatar
    Join Date
    May 2009
    Gender
    male
    Location
    Your going on my 24/7 DDoS hit list.
    Posts
    8,552
    Reputation
    127
    Thanks
    5,971
    My Mood
    Happy
    Thanks for this
    -Rest in peace leechers-

    Your PM box is 100% full.

  12. #11
    mnpeepno2's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    In a barren wasteland
    Posts
    905
    Reputation
    10
    Thanks
    81
    Quote Originally Posted by NextGen1 View Post
    Still no need to double post , PM why06 next time

    Ontopic,

    You could Use my regedit tut and make a windows XP tweak tool (with these)
    i used the registry for a startup, but if it start all the time, it will ask for admin, and people can stop it.

    example: regular user logs on, UAC needs an admin...

    My version: regular user logs on, autonomous mode is on....


    -----------------------------------------------

    My site: here
    My Blog: here
    My member's area: here
    Minecraft Sever Forum: here


    Minecraft Servers:

    Public:



    Private:



  13. #12
    XGelite's Avatar
    Join Date
    Mar 2009
    Gender
    male
    Location
    Enter text here
    Posts
    1,344
    Reputation
    12
    Thanks
    276
    boss .

Similar Threads

  1. [TuT] Manipulating a Fellow Being [Part-1]
    By PoP_KiLLaH in forum Programming Tutorials
    Replies: 3
    Last Post: 12-16-2009, 08:09 AM
  2. Helbreath International Hack/GM Hack tut
    By xxaznrjaexx in forum Hack Requests
    Replies: 1
    Last Post: 01-27-2006, 02:42 AM
  3. Tut. for k. gunz or J. gunz?
    By i eat trees in forum Hack Requests
    Replies: 0
    Last Post: 01-19-2006, 02:56 PM
  4. In-Depth Tut. to hacking in War Rock (Conc. to Dave)
    By fl0 in forum WarRock - International Hacks
    Replies: 15
    Last Post: 01-18-2006, 02:49 PM
  5. Tuts
    By Mukuro in forum Hack Requests
    Replies: 0
    Last Post: 01-09-2006, 04:54 PM