Page 1 of 1

Vb.net Process.GetCurrentProcess

Posted: July 15th, 2011, 10:02 pm
by owner123
So I'm trying to make a boss key in VB
(See this useful-tools-f69/a-boss-tool-t944.html)
I have everything working, I know how to hide it and I know how to make the hotkey.
The problem is getting the application I want to hide. I used this.

Code: Select all

Dim p as Process.GetCurrentProcess()

thinking that it would give me the process that is currently maximized.
But instead of that, it always returns the application that is running (My application)

I already did a google search with no results, so I'm asking any vb users here, how do you find the process that is currently maximized.

Re: Vb.net Process.GetCurrentProcess

Posted: July 17th, 2011, 4:18 am
by haxorico
From my expirience, GetCurrentProcess() is used when injecting a code into a working process. Usually used for hacks or stuff like that.
So if your turn your .exe to a .dll and inject it. It should work (based on the theory that your code is correct)

Re: Vb.net Process.GetCurrentProcess

Posted: July 18th, 2011, 9:46 pm
by owner123
I don't know DLL injection, and neither did my Visual Basic teacher :( (he doesn't know any advanced stuff =\).

I just made a work-around, so I'm closing this.

Re: Vb.net Process.GetCurrentProcess

Posted: July 19th, 2011, 4:51 am
by haxorico
Even though its closed, i feel the need to share my knoledge.
In Visual Studio you can make instead of a win32 application, a dll application (or is it instead of a form inside the win32 app?).
You get all your code in there, and after compiling, youll get a .dll file. Which you can inject into any process using an injector like winject.