View Full Version : Program idea/request: change opacity of another running process to 0%?
07-18-2009, 11:36 PM
I know this isn't a forum where users can post program requests etc. on. But i would really appreciate if someone here could help me out for just a few minutes, i don't think this will be too hard.
My idea is, as it says in the title, to make a small program (that also runs invisible) that will keep checking if a certain process is running (maybe a timer?) and if it is, set the opacity of the program to 0%. And if you can, also mute it from sounds and remove the icon from the taskbar.
I do know a little bit of programming, but unfortunately, it's not enough to make a program like this.
If it's possible, i would appreciate if it is coded in Visual Basic 6, since i know a little bit of it. (and if i need to change anything, it's easier then..)
Of course you don't have to help me, but i would really appreciate it.
I wish i could pay you back somehow, but i unfortunately can't send you money. (don't know how, and don't currently have very much :P) If you need help with anything though, just ask!
Thanks in advance.
07-19-2009, 02:05 PM
I code in Delphi rather than in Visual Basic, and so, AFAIK it is possible to change opacity of another window with use of function SetLayeredWindowAttributes. Just google about it.
What is more, one shoud change an attribute of the specified window (namely add 0x00080000 to an extended window style) to allow opacity effects.
But why not completely hide that window by means of Win32 API? The effect will be the same...
07-19-2009, 03:52 PM
I don't know anything at all about delphi :(
If i hide that window instead of changing the opacity, will the program still be running? Or will it exit?
And is there a way to hide the program from the taskbar/tray and mute it from all sounds?
The reason i asked for someone to do it for me is because i have no idea on how to accomplish a program like this...
Could you maybe.... do it for me? I would appreciate it soo much! :rolleyes:
07-19-2009, 04:35 PM
Hidding the window does not terminate the program.
Yes, it is possible to hide a taskbar icon completely.
In Delphi, it is easy enough, if you know the caption of the window to hide:
WndCaption = 'Untitled - Notepad'; // Notepad as an example
while True do
Wnd := FindWindow(nil, @WndCaption);
if Wnd <> 0 then
if IsWindowVisible(Wnd) then ShowWindow(Wnd, SW_HIDE);
Evnt := CreateEvent(nil, True, False, nil);
This program hides Notepad windows right away when the Notepad starts.
07-19-2009, 06:04 PM
Awesome dude, awesome!
So now you're using the caption instead of the process name to track the program? What happens if the program changes caption then? Will it still work?
And... since i've never used delphi, how do i compile the code to a program? Where can i find a compiler for that?
Thanks again. :)
07-19-2009, 07:20 PM
If the caption is not known a priori, you can get a process by its executable file name. But it is more difficult. For details see http:// (http://www.experts-exchange.com/Programming/Languages/Pascal/Delphi/Q_20185076.html).
Delphi programming environment is not freeware, but you can get a lite version, which is free. http:// (http://cc.embarcadero.com/Free.aspx?id=24722). (To moderators: I post this reference without any advertising considerations and I'll remove it if need be...)
07-19-2009, 09:50 PM
Alright. I finally got it installed, but i have no idea what kind of new project i want to start, where in the code page i'm suppose to paste the code or how to actually compile it to an exe file.
I'm sorry, but it's just to blurry for me.
If you could do me one last favor and actually compile it to an exe file, that would be awesome!
The title of the program i want to hide is "TeamViewer" and the process is "TeamViewer.exe"
I'm sorry if i'm disturbing..
Yet again; thanks a bunch! :)
07-20-2009, 12:04 AM
Use the caption to find the program's PID, then store that as it won't change but the caption could. Then use ShowWindow(SW_HIDE) like a previous user said. That will also remove it from the taskbar. I believe the other functions you need are FindWindow() and GetPID() or something similar, check MSDN.
I made the same program when I was in high school to hide my internet browsing.
07-20-2009, 03:15 PM
nikee: Once you'll start this program, all the windows of the TeamViewer.exe process will be hidden. Moreover, if you'll start another instance of TeamViewer.exe, its window will also be hidden. To terminate the program, kill its process (AntiTeamViewer.exe) in Task manager processes list.
07-22-2009, 06:44 AM
First off, sorry for the late response.
Thank you soo much for helping me out now (including you Dunna), i appreciate it a lot.
I will try the program later today when i get back home, or maybe tomorrow. (i'm going away for the day and will get back home pretty late)
07-23-2009, 01:51 PM
I've tried it now. It works great, just what i wanted...
But, there is one more thing that i want it to do (if it's possible)... and that is to hide the icon in the system tray. Cause if i open teamviewer and then the hide program, i will still see the teamviewer icon in the tray. And if i click it, the teamviewer window pop's up for like a half second or so and then it hides again.
If it doesn't work, i'll have to figure out another way to hide it. Thanks a lot :)
07-23-2009, 03:16 PM
I should like to cease working on this program. This is because as soon as I added the code for deleting an icon tray, my antivirus immediately recognized it as a trojan program. I do not want to pass for a virus writer.
07-23-2009, 03:36 PM
I obviously don't want any AV to detect it as a trojan. I understand you.
Thanks a lot for the help. I appreciate it very much! :)
07-27-2009, 06:19 PM
wops, sorry about this message, didn't mean to post it ^^
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.