• Welcome to Dark Bit Factory & Gravity.
 

Fun with FB's gfxlib...

Started by Dr_D, December 19, 2006

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Dr_D

I didn't post a screenshot because it requires the whole desktop. :stirrer:

Basically, it uses some of the new gfxlib functions to create a flag that scrolls around the screen. It kinda simulates a screensaver.
The Dr. is INsane!!!

DrewPee

You certainly are posting some cool stuff Mr_D!!  :goodpost:

When you say this code uses some of the gfxlib functions - do you mean in a new version of FreeBasic or . . . just a new lib - perhaps it is something i have missed!!!

Drew
DrewPee
aka Falcon of The Lost Boyz (Amiga)
Ex-Amiga Coder and Graphic Designer
Administrator of > www.retrocomputermuseum.co.uk

DrewPee

sorry - meant to say Dr_D - not Mr_D - my apologies!!!  :whack:

Drew
DrewPee
aka Falcon of The Lost Boyz (Amiga)
Ex-Amiga Coder and Graphic Designer
Administrator of > www.retrocomputermuseum.co.uk

Clyde

Wow Dr D dude, thats really cool. Welldone :)
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.


Challenge Trophies Won:

Shockwave

I didn't know you could draw stuff over the desktop like that with FB :) + Karma.
Shockwave ^ Codigos
Challenge Trophies Won:

.:] Druid [:.

really excellent stuff!  thanks for sharing!
[sheep]: im sure he wants to goto prison.. they didnt get him last time.. he was promised a big cock up his arse.. and no doubt looking forward to it.. lets hope he gets his wish this year.

Dr_D

Thanks guys. ;) It's from the current version of FB, which is different from the stable and testing releases. Those functions are part of the new inherent gfxlib. You don't need to include any external libraries. :)
The Dr. is INsane!!!

psygate

man... thats a great job!

*applaude* -> pushing button

but, I just cant compile it.... im using freebasic v 0.17b
He who controlles the minds commands the many.
He who commands the many, conqueres the minds.

Jim

Lots of people won't install 0.17 yet as it's still beta.  It's possible to have 2 versions of FB installed in different folders if you want to get 0.16 as well, because that's what most people are still using until the final of 0.17 comes out.

Jim
Challenge Trophies Won:

Dr_D

Indeed. Also, you can get a daily build here...

http://ecowles.dyndns.org/fbdu/

Eric Cowles, aka 1000101, has set this thing up to do it automatically. I couldn't get it to work straight off though. It seems there are some files needed that only come with the versions that v1c uploads.

Here's exactly what I did...

1) Create a folder like, "C:/DailyFB"
2) Copy the contents of your original FreeBASIC folder to this new one.
3) Download the large package from that site.
4) Extract it to the new directory, answering yes to all when it asks to overwrite.

Don't foget to report if you find any bugs... that's what it's all about, ya know? :D
The Dr. is INsane!!!

psygate

Yeah, thanks, I did it, even before you posted that :2funny: Just used the 'search' function on freebasic.net :cheers: :updance: :updance:
He who controlles the minds commands the many.
He who commands the many, conqueres the minds.

Dr_D

So, you're able to use the new stuff now? :D

The only thing I wish it had was the ability to read the desktop pixel color. It would be reeaalllly fun to make some funky screensavers using a snapshot of the desktop!  Lens map the desktop?!!  :updance:
The Dr. is INsane!!!

Jim

If you can use Windows API, then GetDC(NULL) gets you the desktop HDC and then you can jigger with the bitmap and finally use GetDIBits(...) to retrieve the current desktop bitmap.  Then open a fullscreen popup window and draw the desktop into that however you like it.
http://www.google.com.au/search?hl=en&q=desktop%20getdc(null)%20getdibits&ie=UTF-8&oe=UTF-8&sa=N&tab=gw

Jim
Challenge Trophies Won:

psygate

Yeah, it would be really cool to take a screenshot of the desktop and have fun with it....

The API could do that, but im not so familiar with it, im happy if i can write a program which lets a pixel fly over the screen :||

BUT you could try to do a screenshot with irfan view and then send it to your program, I did this once, if I can find the source, I'll post it here!
He who controlles the minds commands the many.
He who commands the many, conqueres the minds.

Dr_D

Quote from: psygate on December 31, 2006
Yeah, it would be really cool to take a screenshot of the desktop and have fun with it....

The API could do that, but im not so familiar with it, im happy if i can write a program which lets a pixel fly over the screen :||

BUT you could try to do a screenshot with irfan view and then send it to your program, I did this once, if I can find the source, I'll post it here!

Man, that would be awesome! If there was a way to get a cross-platform desktop pic though... :D
The Dr. is INsane!!!

psygate

Ok, I couldn't find the source but I figured out how I did it, so here my step plan to get a screenshot of the desktop:

1.) Write your program and include irfan view.
2.) Let your program start irfan view when it's executed
3.) Send the key which is defined to perform the action of a screenshot into the key-buffer
4.) Let Irfan view save the screenshot in your directory
5.) Close Irfan View
6.) Load the screenshot.

It's not the best way, but its ONE way. I'll gather some informations about screening the desktop, If i  find something, I'll post it! :cheers:
He who controlles the minds commands the many.
He who commands the many, conqueres the minds.