1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

VB6 CaptureScreen Broken in Windoes 7

Discussion in 'Software Development' started by mindshadow, Feb 5, 2013.

Thread Status:
Not open for further replies.
Advertisement
  1. mindshadow

    mindshadow Thread Starter

    Joined:
    Feb 5, 2013
    Messages:
    4
    Something in the past year seems to have broken screen capture from the desktop window. The code example that can be found at http://support.microsoft.com/kb/161299 used to work correctly. Now it works when run in the VB6 IDE but CaptureScreen [ie, capture from the Desktop Window] returns a black rectangle after you Make the application. CaptureForm does work correctly. This occurs with Windows 7 [SP1]. How does one correct this problem?

    Code compiled in April 2012 still works correctly. A version [with very minor changes] compiled in October does not. A similar unmodified Microsoft code sample does not work correctly when compiled today.

    Tech Support Guy System Info Utility version 1.0.0.2
    OS Version: Microsoft Windows 7 Home Premium, Service Pack 1, 64 bit
    Processor: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz, Intel64 Family 6 Model 42 Stepping 7
    Processor Count: 8
    RAM: 6126 Mb
    Graphics Card: AMD Radeon HD 6570, 1024 Mb
    Hard Drives: C: Total - 940429 MB, Free - 515382 MB; D: Total - 13336 MB, Free - 1639 MB; K: Total - 1907026 MB, Free - 1235437 MB;
    Motherboard: PEGATRON CORPORATION, 2AB6
    Antivirus: Webroot SecureAnywhere, Updated and Enabled
     
  2. loserOlimbs

    loserOlimbs

    Joined:
    Jun 19, 2004
    Messages:
    7,800
    What sort of minor changes did you make?
     
  3. mindshadow

    mindshadow Thread Starter

    Joined:
    Feb 5, 2013
    Messages:
    4
    In my program, screen capture is only one feature. I made five small changes to the MouseUp handler There were no changes to the module that does screen capture, and the changes I did make were not in the execution path [keyboard handler for ctrl-c].

    To remove any effects from my own code, I checked an unmodified copy of sample code published by Microsoft many years ago. It exhibits the same symptoms [my code is based on the Microsoft code], but the significant point is that Microsoft code that once worked now does not.
     
  4. loserOlimbs

    loserOlimbs

    Joined:
    Jun 19, 2004
    Messages:
    7,800
    What if you recreate this setup in a new program? Will it do the same (Work in VS but not as a standalone exe)?

    Also, how are you releasing the exe? As some sort of install? Or are you grabbing the exe from debugging or another way?
     
  5. mindshadow

    mindshadow Thread Starter

    Joined:
    Feb 5, 2013
    Messages:
    4
    That's why I tried the MS sample code. It shows the same behavior in two different programs.

    I use the Make command [File menu] to build the app. When I release, I use Inno Setup [http://www.jrsoftware.org/isinfo.php] to build an installer. The problem manifests itself after doing the Make and running the resulting exe.
     
  6. mindshadow

    mindshadow Thread Starter

    Joined:
    Feb 5, 2013
    Messages:
    4
    It turns out the problem is caused by a "feature" of Webroot. In an attempt to protect you against potential problems from software with which Webroot is not familiar, Webroot interferes with Copy & Paste. Thanks to the folks at Just Great Software for pointing this out. Here's their solution:

    After some more digging we found that the inability to paste is actually a "feature" of WebRoot. Presumably WebRoot thinks that text copied from applications like browsers and email clients may be sensitive, and shouldn't be pasted by other applications without your permission. If you are running WebRoot SecureAnywhere, follow these steps to make sure that you can paste without restriction into your favorite applications:
    1. Open WebRoot SecureAnywhere
    2. Click the Identity & Privacy tab
    3. Click on Identity Shield in the left hand list
    4. Click the View/Edit Protected Applications link
    5. Select the Allow option for all applications that you want to be able to copy and paste text normally
     
  7. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1088343

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice