Hide blitz exe from applications list?

Blitz3D Forums/Blitz3D Programming/Hide blitz exe from applications list?

FlagDKT(Posted 2010) [#1]
Visible in processes list only...How to do it?


xlsior(Posted 2010) [#2]
Don't have any windows open?


_PJ_(Posted 2010) [#3]
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?lngWId=1&txtCodeId=66529


FlagDKT(Posted 2010) [#4]
How to do it in blitz3d?


Serpent(Posted 2010) [#5]
Malice's link is for hiding a process from the process list - very 'useful' (Evil Laugh).

Anyway task manager's applications list simply shows open windows.

Depending on what you're trying to do in your program, you can either hide Blitz's window (with Win APIs such as ShowWindow), or look into hiding your window from the taskbar.

Winamp (an awesome music player) has an option in preferences to make it visible on the taskbar, or hide it from the taskbar. I noticed that when it is visible on the taskbar, it is also listed in Task Manager's applications list. When it was not visible on the taskbar, it was also not present in the applications list.

So before I can provide any more help: Do you need to have the blitz window visible? If so, do you still need it to be visible on the taskbar? And finally what do you need to do this for?


FlagDKT(Posted 2010) [#6]
I don't need blitz window visible, I want it to hide from running applications in applications list *and* if it is possible in blitz3d, hide it even from the process list.
totally invisibile :D


Serpent(Posted 2010) [#7]
totally invisible? suspicious.....

Anyway, sure it's possible to hide the Blitz3D window. In fact, you can make your program hide any window if you want (yep, windows is sooo secure against malicious software....)

First up I'm going to assume you know about .decls files (if not just browse the forums or ask for an explanation)

All you need to hide your window is the function ShowWindow. The name is deceptive - it doesn't just show windows, it lets you set whether a window is minimized, maximised, restored, shown, or hidden. The .decls file is as follows:

.lib "user32.dll"
ShowWindow%(hWnd%,nCmdShow%)


If you want more information about it than what I share just go to http://msdn.microsoft.com/en-us/library/ms633548%28VS.85%29.aspx
The MSDN website is very useful - it lists tonnes of different Windows functions.


hWnd% is an integer that contains the handle to the window that you want to close. nCmdShow% is an integer that specifies what you want to do to the window.

i.e.
hWnd% is the window.
nCmdShow% is the action.

In order to hide or show your Blitz window you will need these two bits of information.

To get the handle to the Blitz window:
hWnd = SystemProperty("AppHWND")


The two values that you may need for nCmdShow are 0 and 5. 0 is the windows constant SW_HIDE and 5 is the windows constant SW_SHOW.
Basically:
Hide - 0
Show - 5

So if you wanted your program to hide itself at start:
hWnd = SystemProperty("AppHWND")
ShowWindow(hWnd,0)



I've used this on a number of occasions with other windows functions. For example, in my [bad] chat program users can press F8 to hide and show the window as if they're using window hiding software.

If you are looking to hide the process from the process list in task manager, it would be a lot harder than two lines of code. Malice's link appears to be genuine. Unfortunately, it provides uncompiled VB code. I don't have anything regarding VB on my computer - I'll see if I can compile it at school or something. Either way, the code seems to make a DLL which you should be able to use in the same way as windows functions - through a .decls file. Unless you or someone else can compile the VB source code, I'm afraid there's nothing you can really no about that - unless there's something else on the internet but I haven't been bothered to search.


Serpent(Posted 2010) [#8]
I've started googling stuff. There is a nice, very powerful utility called winpadlock, but the download link on the website is broken and I can't find it anywhere else...


FlagDKT(Posted 2010) [#9]
cool thx :)