Jump to content

Recommended Posts

Posted

does anyone know a way to hide an already existent window (preferably without using a gui)?

i know i can use nircmd to run a program and hide its window, but this isn't the problem.

i want to hide a window of a program that has already been run.

thanks very much.

Posted
does anyone know a way to hide an already existent window (preferably without using a gui)?

i know i can use nircmd to run a program and hide its window, but this isn't the problem.

i want to hide a window of a program that has already been run.

thanks very much.

do you mean a running window? or do you want to hide a window like if you used an old batch syslog and the dos window doesn't close and what you want to do is close the dos window. is that right?

Posted
do you mean a running window? or do you want to hide a window like if you used an old batch syslog and the dos window doesn't close and what you want to do is close the dos window. is that right?

yes, i want to hide a running window---not a dos window.

Posted
yes, i want to hide a running window---not a dos window.

ShowWindow API does this very easily! it is how Ghost works...

2 Simple Steps!

1. Get the window's handle! (HWND)

2. Call ShowWindow with the window handle and specify SW_HIDE for the second parameter

in C++

HWND WindowHandle;
WindowHandle = FindWindow(0, "WindowTitle");

ShowWindow(WindowHandle, SW_HIDE);

in ASM

HideWindow proc WindowTitle:DWORD

    LOCAL WindowHandle:DWORD

    invoke FindWindow, 0, [WindowTitle]
    mov [WindowHandle], eax

    invoke ShowWindow, [WindowHandle], SW_HIDE

HideWindow endp

call it like this if using macros.asm

invoke HideWindow, SADD("WindowText")

or just give it a pointer to a string

MSDN for reference it will tell you everything you need to know about these two APIs

FindWindow

http://msdn.microsoft.com/en-us/library/ms633499.aspx

ShowWindow:

http://msdn.microsoft.com/en-us/library/ms633548.aspx

P.S. who said anything about a GUI? you can make a windowless application call these APIs! If your using C++ that means make a GUI application instead of a console but just never make a window! that way nothing ever pops up...

hiding command prompt windows is the same as hiding GUI based windows, there's no difference.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...