Send a suggestion!

We're building a brand new version of the site, and we'd love to hear your ideas

Members

Technology Zones

IBM Learning Center

Articles

Hosted By

MaximumASP

Info

[4630] Capture a Screen Shot

Last post 06-01-2008 7:23 PM by sledghammer64. 39 replies.
Page 3 of 3 (40 items) < Previous 1 2 3
Sort Posts: Previous Next
  • 12-07-2006 10:07 PM In reply to

    Re: [4630] Capture a Screen Shot

    Hi

    I have an application which lists all the active applications in a combo box and lets the user select an application. I am trying to get the handle to this selected application and calling the CaptureWindowToFile function and trying to save it as a bmp. Unfortunately I am unable to get the screen shot of my selected application.

    Any help in this regard will be greatly appreciated.

    Thanks in Advance,

    Shyam

     

     

    • Post Points: 10
  • Advertisement

    • Red Gate Software

    Advertisement

    Want to boost your .NET application performance?

    Some developers always seem to write efficient and lightening-fast code. What is their secret? It’s ANTS Profiler. “We improved the performance of the application up to 10 times” Dan Ports, Intrigma.

    Try it for yourself now.

  • 12-08-2006 4:51 AM In reply to

    • pcmattman
    • Top 150 Contributor
    • Joined on 01-03-2006
    • Fanatic Member
    • Points 1,385

    Re: [4630] Capture a Screen Shot

    How are you getting the active applications? Usually you would enumerate all the windows that are open by getting their handles, then getting the window title from that to be put into the combobox, with the handle saved as well. This will use a lot of API calls, and you might want to use Google quite a bit. Then all you have to do is pass the handle to the function.

    gdt_set_gate(5, (unsigned long) &global_tss, sizeof( TSS_t ) + 0xFFFF, 0x89, 0x0F );

    http://www.sourceforge.net/projects/mattise - My hobby operating system (Intel, 32-bit only).
    • Post Points: 10
  • 12-08-2006 4:57 PM In reply to

    Re: [4630] Capture a Screen Shot

    Hi

    Thanks so much for your reply.

    I am exactly doing the way you have said it. To explain briefly what I am doing ...

    I have a VB.NET application where I need to capture the screenshot of the applications that are currently running. So I am enumerating all the process and populating a combo box with only those which has a main window title (the other processes do not have a main window title so that I am filtering out only the applications in the task bar). Then I am allowing the user to select an application and passing the main window handle to get the screenshot. But this unable to do it. Everytime I pass the main window handle I am only getting the screenshot of the current active application and NOT the screenshot of the application the user chooses. I would really appreciate if you have any sample code to do this.

    I am using Microsoft Dev Environment 2003, ver 7.1.3088 and .NET framework 1.1

    Thanks in Advance,

    Shyam

     

     

     

     

    • Post Points: 10
  • 12-09-2006 12:46 AM In reply to

    • pcmattman
    • Top 150 Contributor
    • Joined on 01-03-2006
    • Fanatic Member
    • Points 1,385

    Re: [4630] Capture a Screen Shot

    I would make sure that all of the window handles are different - by the sounds of it you are only retrieving the active window's handle, which is not what you want.

    Unfortunately I can't help you with code, as I know nothing of VB .NET (I gave you a general explanation), but I can give you these tips:

    • Debug and put breakpoints at the point where you get the handles. This way you can check and make sure that they are all unique
    • Make sure that the method you are using is the right one
    • Check your code!

    I hope this helps you in some way... sorry I can't post code, if I could, I would!

    gdt_set_gate(5, (unsigned long) &global_tss, sizeof( TSS_t ) + 0xFFFF, 0x89, 0x0F );

    http://www.sourceforge.net/projects/mattise - My hobby operating system (Intel, 32-bit only).
    • Post Points: 10
  • 12-11-2006 7:16 PM In reply to

    Re: [4630] Capture a Screen Shot

    Hi

    Thanks for your reply.

    Even if I hardcode the windows handle I want the screenshot of I am getting a bitmap with a black rectangle. I just want to make sure that if I pass a windows handle will I be able to get the screen shot or not using this Screenshot class. Because if I give the current windows handle it is giving the bitmap correctly.

    Shyam

     

    • Post Points: 10
  • 12-12-2006 4:21 AM In reply to

    • pcmattman
    • Top 150 Contributor
    • Joined on 01-03-2006
    • Fanatic Member
    • Points 1,385

    Re: [4630] Capture a Screen Shot

    I'm not sure what the problem is. I'll be able to be progamming again next week so I'll look into it.

    gdt_set_gate(5, (unsigned long) &global_tss, sizeof( TSS_t ) + 0xFFFF, 0x89, 0x0F );

    http://www.sourceforge.net/projects/mattise - My hobby operating system (Intel, 32-bit only).
    • Post Points: 5
  • 12-20-2006 6:52 AM In reply to

    Re: Capture Mouse Image..

    i had the same problem too,but i just tried aca and solved thr problem, here is the details. i hope it helps.
    http://screen-capture.spaces.live.com/blog/cns!543BF253C6896A68!133.entry


    • Post Points: 5
  • 12-20-2006 10:05 AM In reply to

    • pcmattman
    • Top 150 Contributor
    • Joined on 01-03-2006
    • Fanatic Member
    • Points 1,385

    Re: [4630] Capture a Screen Shot

    Make sure that you are using SRCCOPY! Also make sure that all the code is exactly the same as it appears here. I tried this code out in C++ and it DID NOT WORK at first. A little investigation showed that I had cut corners and written SRCPAINT instead of SRCCOPY...

    If that doesn't solve your problem, I'lm not sure what the problem is Tongue Tied [:S]...

    gdt_set_gate(5, (unsigned long) &global_tss, sizeof( TSS_t ) + 0xFFFF, 0x89, 0x0F );

    http://www.sourceforge.net/projects/mattise - My hobby operating system (Intel, 32-bit only).
    • Post Points: 5
  • 08-01-2007 7:03 PM In reply to

    • Barzille
    • Not Ranked
    • Joined on 08-01-2007
    • Germany
    • New Member
    • Points 5

    Direct3D : Capture a Screen Shot

    I've got a problem with screenshots of direct3d windows. After taking a first shot everything is fine. The second and all following shots are not updated correctly. Instead they always show the first done screenshot. Normal windows are updated normally. So is there anything I can do? I wonder if there's a command missing for flushing direct3d input or something else.

    Has anybody an idea?

    Thanks, Maik

    • Post Points: 5
  • 06-01-2008 7:23 PM In reply to

    Anujit: Capture a Screen Shot

    I have not tried it yet..but lets see..it      

    • Post Points: 5
Page 3 of 3 (40 items) < Previous 1 2 3