Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Desktop screenshot...

Author
Message
Acolyte
18
Years of Service
User Offline
Joined: 3rd Feb 2006
Location:
Posted: 6th Sep 2006 22:44
Here's one for you...

Is there any way to get a screen shot of the windows desktop while in windowed mode, put it in an image, or bitmap, and then do an effect on it and paste it on top of the screen? I'm trying to develop a sort of cool transition so when you start up a game, it doesn't just automatically go full screen, it fades to black, or something like that.

I'm fairly positive I could do this with Win API code, but that's such a hassle. Do you guys know of any way to do this with the GDK?

If not, could you point me in the right direction for how I would go about using code at runtime in c++ to get a screenshot and then paste it back on the screen?

Windows XP Home Ed. SP/2 ---> GeForce FX 5500 - 256MB
160 GB HD ---> 1 Gig RAM
OSX Using Happy Dude
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 6th Sep 2006 22:53
It should be fairly easy to get the desktop - however, the real problem is converting it to a memblock format.

Come to the last Unofficial DBPro Convention - register interest by Saturday 2/9/06 (http://convention.logicstudios.net/)
Demoing at the last Chichester Convention : Humans On A Planet
Acolyte
18
Years of Service
User Offline
Joined: 3rd Feb 2006
Location:
Posted: 7th Sep 2006 01:34
to get the desktop, would it be as basic as looping through with a for for the rows and columns of pixels and getting the color of the each pixel?

if it is, what commands should i use to put each pixel into a bitmap, or image?

Windows XP Home Ed. SP/2 ---> GeForce FX 5500 - 256MB
160 GB HD ---> 1 Gig RAM
OSX Using Happy Dude
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 7th Sep 2006 10:28 Edited at: 7th Sep 2006 10:33
Nothing that simple.

What you would have to do is get the desktop as a bitmap (getting its size and depth first) and somehow convert that into something DBPro/GSDK likes.

The following is a bit of .Net code that seems to get the desktop as a bitmap : http://www.codeguru.com/forum/archive/index.php/t-311501.html

Come to the last Unofficial DBPro Convention - register interest by Saturday 2/9/06 (http://convention.logicstudios.net/)
Demoing at the last Chichester Convention : Humans On A Planet
Acolyte
18
Years of Service
User Offline
Joined: 3rd Feb 2006
Location:
Posted: 8th Sep 2006 02:32
thanks...if i get it completed perhaps i'll try to release the transition in a DLL so we can all use it together.

Windows XP Home Ed. SP/2 ---> GeForce FX 5500 - 256MB
160 GB HD ---> 1 Gig RAM
malcolm
20
Years of Service
User Offline
Joined: 1st Mar 2004
Location:
Posted: 9th Sep 2006 12:17
i am not sure what you want but
i press the PrintScreenSysRg key mine is next to scroll lock key
then load paint
goto edit menu
then pick paste

a image of the window you was seeing should be there
EddieB
20
Years of Service
User Offline
Joined: 29th Sep 2004
Location: United Kingdom
Posted: 9th Sep 2006 12:38
He wants a real time image.
monotonic
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Nottinghamshire, England
Posted: 14th Sep 2006 14:37 Edited at: 14th Sep 2006 14:38
What I used to do was minimise the app window (if you don't want your app in the screenshot) then using the DirectX api call the GetFrontBuffer function, below is a link to web page describing how this can be done, it uses dx8 but the same principle applies to dx9, you just have to modify some of the code for it to work with dx9.

http://www.geocities.com/foetsch/d3d8screenshot/d3d8screenshot.htm

I know the voices aren't real, but they have good ideas!
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 8th Oct 2006 07:56
I am thinking of writing a program, to graffiti the desktop and would really like to screen capture the desktop but i also thought of another way create a transparent window apply some graffiti and walla the prob with this is the graffiti wont stay on desktop if this is what yu want as i would like a save feature.

fubar
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 8th Oct 2006 08:50
I just found this link which shows how to put bullet holes on desktop with full c++ source http://www.codeguru.com/cpp/g-m/multimedia/desktopeffects/article.php/c4719/

fubar
VRMan3D
19
Years of Service
User Offline
Joined: 3rd Apr 2005
Location: New England
Posted: 9th Oct 2006 20:17
Hi folks,

I do the very same sort of thing with some of my apps, and I put the capability into a convient .DLL already for you all to enjoy.

I think it can be found at my website (uh if not I'll put it back up shortly for you): http://www.vrman3d.com. It's called vrSnap.dll and it's easy to use, it creates a bitmap on the harddrive that you can then just use dbLoadIMage to load.

Have fun.

If you don't find it there anytime soon, yell at me and I'll fix it. It's definitely a fun way to start a program. You have to make sure you call dbHideWindow before calling it so the app you just started running and called it from doesn't obscure the desktop. Then just show the window after you've got your bitmap.

I'll paste some code examples in here soon.

Best regards,
-=VRMan=-

World Famous 3D Screensavers
-- http://www.vrman3d.com --
VRMan3D
19
Years of Service
User Offline
Joined: 3rd Apr 2005
Location: New England
Posted: 9th Oct 2006 21:02
Here's a sample in DBPro of how to use vrSnap.dll:



Let me know if you have any questions about it. And once again, you can pick it up for free (currently) at http://www.vrman3d.com. I just put it on the main page and I'll try to add some code samples in C++ and a working downloadable demo in both C++/GDK and DarkBasicPro.

While you're there please leave a note on my guestbook.

Best regards,
-=VRMan=-

World Famous 3D Screensavers
-- http://www.vrman3d.com --
VRMan3D
19
Years of Service
User Offline
Joined: 3rd Apr 2005
Location: New England
Posted: 9th Oct 2006 22:24
There, I actually created a fun demo with it. And by the way, when we (my friend Sean Currier and I) wrote vrSnap, we made it so that it will work on any Windoze platform. There is a different technique required for each version of Windoze (figures) to grab the desktop. So vrSnap does it all instantly with a couple lines of DBPro code. Check out the demo.

It can be downloaded at http://www.vrman3d.com. You will need both the vrSnap.dll and the vrSnapDemo01.exe (or .dba file and DBPro Compiler) files. My son gave it a rating of "Holy cow that is cool dad! Can I have a copy of that?"

It transforms your desktop into an illusion of your desktop in 3D hehheh. So it's a great thing to put on your wife or girlfriend's computer to freak her out....

If someone makes another demo with vrSnap.dll please let me know and I'll will showcase it on my website. DarkBasicPro or Dark Game GDK preferably.

Best regards,
-=VRMan=-

World Famous 3D Screensavers
-- http://www.vrman3d.com --

Login to post a reply

Server time is: 2024-11-19 08:46:00
Your offset time is: 2024-11-19 08:46:00