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.

DarkBASIC Professional Discussion / Can DBPro be used to affect other windows?

Author
Message
Gardocki
23
Years of Service
User Offline
Joined: 31st Oct 2002
Location:
Posted: 16th Sep 2003 20:25
DBPro has some incredibly fast 2D commands, and can apply them to the entire screen at good frame rates, etc etc...

Can this be applied to say, and IE window? Or My Computer? Or the whole desktop? Basically what I'm trying to do is write a utility that can take the screen or a portion of the screen and rotate or mirror it, similar to nVidia's nRotate app that comes with the detonator drivers.

For those of you who don't know what I'm talking about, it can turn the display 90, 180, or 270 degrees so that it's sideways or upside down (Picture the start bar on the top, with the whole screen flipped). It's useful for monitors that can turn to view pages and for tablet pcs and things, but it doesn't have much functionality, and it only works with nVidia cards.
Darclyte
23
Years of Service
User Offline
Joined: 13th Jun 2003
Location: Cydonia, Mars
Posted: 16th Sep 2003 22:23
DBPro can't touch anything outside its own window.

You could do it with a dll written in another language (ie;C++,VB,Delphi) but that kind of defeats the object doesn't it.

Sorry, but it ain't gonna happen!

Strings are PChars ??????? What a World
CattleRustler
Retired Moderator
22
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 16th Sep 2003 22:37
wait, could dbp run minimized and use a call to the PrintScreen key? Then wite the clipboard data to a file(bmp), then use dbp images/sprite functionality to do what he wants? just taking a blind shot in the dark...

RUST

-RUST-
empty
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 16th Sep 2003 22:41
Althoug I really wouldn't use DBpro for this tasks, it is possible (without using a plug-in) via the Windows API.
Get the handle of the current Window (or the window you want to capture), create a device context of that window, copy the memory address given by the device context handle to a memory block, and now (the hard part, depending on what you want to do) convert the content of the memblock to a image-memblock format.

I awoke in a fever. The bedclothes were all soaked in sweat.
She said "You've been having a nightmare and it's not over yet"
OSX Using Happy Dude
22
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 16th Sep 2003 22:57
I've got a plug-in that will allow the sending of key strokes, mouse presses to the current active window.


Avatar & Logo by Indi. Come to the UK DBPro Convention in Chichester
Gardocki
23
Years of Service
User Offline
Joined: 31st Oct 2002
Location:
Posted: 17th Sep 2003 00:14
Thanks guys. I kinda figured that DB was pretty much confined to its own window, but it never hurts to ask. Maybe I'll tackle this one in VB or C++.
CattleRustler
Retired Moderator
22
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 17th Sep 2003 00:29
it should be very easy in VB

-RUST-

Login to post a reply

Server time is: 2026-07-26 05:03:24
Your offset time is: 2026-07-26 05:03:24