[REQUEST] Application Hider ?

Do you need something made? then ask in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
39 posts Page 2 of 4
User avatar
mandai
Coding God
Coding God
Posts: 2585
Joined: Mon Apr 26, 2010 6:51 pm

Re: [REQUEST] Application Hider ?
mandai
There is no need to see XroX's code as this is fairly simple to do.

You can use this to list and hide/show windows:
Code: Select all
    <DllImport("user32.dll")> Shared Function GetWindowText(ByVal hWnd As IntPtr, ByVal lpString As StringBuilder, ByVal nMaxCount As Integer) As Integer
    End Function

    Dim windowHandles As List(Of IntPtr) = New List(Of IntPtr)

    Function del_EnumWindowsProc(ByVal hwnd As IntPtr, ByVal lParam As UInteger) As Boolean
        Dim sb As StringBuilder = New StringBuilder(255) ' MAXTITLE = 255

        GetWindowText(hwnd, sb, sb.MaxCapacity)

        Dim winTitle As String = sb.ToString()
        If winTitle.Length > 0 Then
            listWindows.Items.Add(winTitle)
            windowHandles.Add(hwnd)
        End If

        Return True
    End Function

    Delegate Function EnumWindowsProc(ByVal hWnd As IntPtr, ByVal lParam As UInteger) As Boolean

    <DllImport("user32.dll")> Shared Function EnumDesktopWindows(ByVal hDesktop As IntPtr, ByVal lpEnumCallbackFunction As [Delegate], ByVal lParam As UInteger) As Boolean
    End Function

    Private Sub btnList_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnList.Click

        windowHandles.Clear()
        EnumDesktopWindows(IntPtr.Zero, New EnumWindowsProc(AddressOf del_EnumWindowsProc), 0)

    End Sub

    <DllImport("user32.dll")> Shared Function ShowWindow(ByVal hWnd As IntPtr, ByVal nCmdShow As Integer) As Boolean
    End Function

    Const SW_HIDE As Integer = 0

    Private Sub btnHide_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnHide.Click

        If listWindows.SelectedIndex > -1 Then
            ShowWindow(windowHandles(listWindows.SelectedIndex), SW_HIDE)
        End If
    End Sub

    Const SW_NORMAL As Integer = 1

    Private Sub btnShow_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnShow.Click

        If listWindows.SelectedIndex > -1 Then
            ShowWindow(windowHandles(listWindows.SelectedIndex), SW_NORMAL)
        End If
    End Sub
Where listWindows is a listbox control.
User avatar
Axel
Coding God
Coding God
Posts: 1928
Joined: Sun Jun 27, 2010 9:15 pm

Re: [REQUEST] Application Hider ?
Axel
You probably didn't know you have to put
Code: Select all
Imports System.Runtime.InteropServices
on top
http://vagex.com/?ref=25000
User avatar
clanc789
Coding Guru
Coding Guru
Posts: 786
Joined: Tue Nov 02, 2010 4:45 pm

Re: [REQUEST] Application Hider ?
clanc789
Mandai how on earth did you know this then? I mean you know like EVERYTHING about MYSQL, FTP,TCP,VB.NET,C# etc etc.
Practice makes perfect!

VIP since: 6-10-2011
User avatar
M1z23R
VIP - Donator
VIP - Donator
Posts: 622
Joined: Tue Sep 28, 2010 4:55 pm

Re: [REQUEST] Application Hider ?
M1z23R
His life is dedicated to computers :) That is how and why he knows every single thing about computers :) every single bit :D
User avatar
CodenStuff
Site Admin
Site Admin
Posts: 4392
Joined: Tue Aug 04, 2009 1:47 am

Re: [REQUEST] Application Hider ?
CodenStuff
mandai isnt real hes A.I. thats why he doesnt talk much..he only responds to programming questions lol. I asked him how to boil an egg once and he didnt answer so I rephrased my question and asked "How do you boil a Egg in .NET" and he replied:
Code: Select all
If Water = Boiling then
 PutEggInWater = True
 Timer1.Interval = "180000"
End If
What type of program are you making XroX that requires you to hide the running process? - hope its a friendly app :)
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
User avatar
clanc789
Coding Guru
Coding Guru
Posts: 786
Joined: Tue Nov 02, 2010 4:45 pm

Re: [REQUEST] Application Hider ?
clanc789
CodenStuff wrote:
mandai isnt real hes A.I. thats why he doesnt talk much..he only responds to programming questions lol. I asked him how to boil an egg once and he didnt answer so I rephrased my question and asked "How do you boil a Egg in .NET" and he replied:
Code: Select all
If Water = Boiling then
 PutEggInWater = True
 Timer1.Interval = "180000"
End If
What type of program are you making XroX that requires you to hide the running process? - hope its a friendly app :)
HAHAH, i rlly was ROFL by that cody :)
Practice makes perfect!

VIP since: 6-10-2011
User avatar
mandai
Coding God
Coding God
Posts: 2585
Joined: Mon Apr 26, 2010 6:51 pm

Re: [REQUEST] Application Hider ?
mandai
Lol good joke there.
Did the code work?

For the programming questions, it does help to answer like an A.I. sometimes.
User avatar
Agust1337
Coding God
Coding God
Posts: 2456
Joined: Fri Feb 19, 2010 8:18 pm

Re: [REQUEST] Application Hider ?
Agust1337
Not always, sometimes we are like : "What the f*** is that?"
Top-notch casual Dating
User avatar
mandai
Coding God
Coding God
Posts: 2585
Joined: Mon Apr 26, 2010 6:51 pm

Re: [REQUEST] Application Hider ?
mandai
You could always ask.
User avatar
clanc789
Coding Guru
Coding Guru
Posts: 786
Joined: Tue Nov 02, 2010 4:45 pm

Re: [REQUEST] Application Hider ?
clanc789
mandai wrote:
Lol good joke there.
Did the code work?

For the programming questions, it does help to answer like an A.I. sometimes.
WOOT, he said LOL!

just kidding ^^

mandai is just tha best coder of the site :)
Practice makes perfect!

VIP since: 6-10-2011
39 posts Page 2 of 4
Return to “Tutorial Requests”