Hack Forums
[.NET] [Example]Getting a Window Handle & Showing/Hidding the window - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [.NET] [Example]Getting a Window Handle & Showing/Hidding the window (/showthread.php?tid=2867276)



[Example]Getting a Window Handle & Showing/Hidding the window - Mr.TwEaK - Sep 16, 2012

Okay lets get straight to it. Do your 3 steps.

Open Visual Basic(Or Visual Studio), making a new form application, and name it.

Once you have that done add a Label, TextBox, and 3 Buttons.
Name the label "Process Name:" (without quotes)
Name first button "Get Handle", second button "Show", and third button "Hide" (Without quotes)

Now right click your form and click View Code, So now we can declare some variables. Check out the spoiler for code.
Spoiler (Click to View)

Double click your Get Handle Button and add this code to it
Spoiler (Click to View)

Double click your Show button and add this code to it
Spoiler (Click to View)

Double click your Hide button and add this code to it
Spoiler (Click to View)

So now your code should look like this
Spoiler (Click to View)

You can use the different defined Const for Minimizing, Maximizing, Restoring your window and more.

I hope you enjoyed the following example, cheers everyone.


* - Khaos Theory - Sep 16, 2012

Great tutorial. I'm sure it will help out a lot of people! 👍