CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Oct 2010
    Posts
    5

    Question VB 6 : TaskVisible=false does not work in Windows 7?

    I have a small windows application that we run on Windows XP. Once the application starts, it removes itself from the programs list using the App.TaskVisible = false code.

    However, when we run this application in Windows7, this line of code does not work and the program is clearly seen in the programs list.

    When the application runs, a windows form is shown to the users and they have to input some data. This is a required process in the company and we want users not to bypass this. We want to prevent lazy users from ending/closing the application through the task manager.

    Does anyone know how we can do this for windows 7?

  2. #2
    Join Date
    Oct 2010
    Posts
    5

    Smile Re: VB 6 : TaskVisible=false does not work in Windows 7?

    Just to clarify : It's nothing suspicious, I assure you.

    As part of our company policies, every 2 months, this small windows application is automatically run. It shows a small windows app with fields that the user must fill-up then submit. We disabled the close control button so that the only way they can close it is by completing the form.
    However, some users are familiar enough with their PCs and lazy enough to try and bypass this process by terminating the application in task manager. This is against company policies and we just want to make it harder for them to do this by removing the appliction from the taskbar and the Task Manager >> Applications List (its is still visible in the Task Manager >> Processes list with an obscure name)

    Nothing suspucious here, since it is a windows application, very much visible to the user and not some secret process running in the background.

    The code hides the application fine in XP, but does not work in Windows7. Is this some new security feature? Not allowing applications to programmatically hide themselves from the Applications List in the Task Manager?
    Last edited by kercher; October 12th, 2010 at 12:21 AM.

  3. #3
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: VB 6 : TaskVisible=false does not work in Windows 7?

    Just send a report if they don't fill in the blank within 1 or 2 hours. Grounds to terminate, on second offense!
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  4. #4
    Join Date
    Oct 2010
    Posts
    5

    Re: VB 6 : TaskVisible=false does not work in Windows 7?

    so basically there's nothing I can do about this?
    just want to know 'cause my managers are breathing down my neck for answers

  5. #5
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: VB 6 : TaskVisible=false does not work in Windows 7?

    Windows has a Service Account, that you can use to run as a SERVICE. The best you can do is to automatically restart it if it fails.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  6. #6
    Join Date
    Jul 2010
    Posts
    14

    Re: VB 6 : TaskVisible=false does not work in Windows 7?

    You could use apis like FindWindow to try to get the taskmgr window, and then setting its visibility to false, or moving it offscreen until the form has been completed.

  7. #7
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: VB 6 : TaskVisible=false does not work in Windows 7?

    Or the old trick to set it's height to 0"
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured