Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 14 of 14
  1. #1
    Regular Coder
    Join Date
    Jan 2009
    Posts
    173
    Thanks
    5
    Thanked 12 Times in 11 Posts

    Lightbulb Program idea/request: change opacity of another running process to 0%?

    Hey.

    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.
    -Nike

  • #2
    Regular Coder Amphiluke's Avatar
    Join Date
    Jul 2009
    Posts
    312
    Thanks
    3
    Thanked 89 Times in 89 Posts
    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...
    I am still learning English

  • #3
    Regular Coder
    Join Date
    Jan 2009
    Posts
    173
    Thanks
    5
    Thanked 12 Times in 11 Posts
    Thanks.

    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!

  • #4
    Regular Coder Amphiluke's Avatar
    Join Date
    Jul 2009
    Posts
    312
    Thanks
    3
    Thanked 89 Times in 89 Posts
    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:
    Code:
    program Project1;
    
    uses
      Windows;
    
    var
      Wnd: HWND;
      Evnt: Cardinal;
    
    const
      WndCaption = 'Untitled - Notepad'; // Notepad as an example
    
    begin
    
      while True do
      begin
        Wnd := FindWindow(nil, @WndCaption[1]);
        if Wnd <> 0 then
          if IsWindowVisible(Wnd) then ShowWindow(Wnd, SW_HIDE);
        Evnt := CreateEvent(nil, True, False, nil);
        WaitForSingleObject(Evnt, 500);
        CloseHandle(Evnt);
      end;
    
    end.
    This program hides Notepad windows right away when the Notepad starts.
    Last edited by Amphiluke; 07-19-2009 at 04:41 PM. Reason: Grammar revised
    I am still learning English

  • #5
    Regular Coder
    Join Date
    Jan 2009
    Posts
    173
    Thanks
    5
    Thanked 12 Times in 11 Posts
    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.

  • #6
    Regular Coder Amphiluke's Avatar
    Join Date
    Jul 2009
    Posts
    312
    Thanks
    3
    Thanked 89 Times in 89 Posts
    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://.

    Delphi programming environment is not freeware, but you can get a lite version, which is free. http://. (To moderators: I post this reference without any advertising considerations and I'll remove it if need be...)
    Last edited by Amphiluke; 07-19-2009 at 07:26 PM.
    I am still learning English

  • #7
    Regular Coder
    Join Date
    Jan 2009
    Posts
    173
    Thanks
    5
    Thanked 12 Times in 11 Posts
    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!

  • #8
    Regular Coder
    Join Date
    May 2004
    Location
    New Hampshire, America
    Posts
    246
    Thanks
    0
    Thanked 2 Times in 2 Posts
    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.

  • #9
    Regular Coder Amphiluke's Avatar
    Join Date
    Jul 2009
    Posts
    312
    Thanks
    3
    Thanked 89 Times in 89 Posts
    Attachment 7600
    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.
    Last edited by Amphiluke; 01-03-2012 at 08:39 AM.
    I am still learning English

  • #10
    Regular Coder
    Join Date
    Jan 2009
    Posts
    173
    Thanks
    5
    Thanked 12 Times in 11 Posts
    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)


  • #11
    Regular Coder
    Join Date
    Jan 2009
    Posts
    173
    Thanks
    5
    Thanked 12 Times in 11 Posts
    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

  • #12
    Regular Coder Amphiluke's Avatar
    Join Date
    Jul 2009
    Posts
    312
    Thanks
    3
    Thanked 89 Times in 89 Posts
    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.
    I am still learning English

  • #13
    Regular Coder
    Join Date
    Jan 2009
    Posts
    173
    Thanks
    5
    Thanked 12 Times in 11 Posts
    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!

  • #14
    Regular Coder
    Join Date
    Jan 2009
    Posts
    173
    Thanks
    5
    Thanked 12 Times in 11 Posts

    Question Alternative to overflow:hidden?

    wops, sorry about this message, didn't mean to post it ^^


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •