Author Topic: Fun with FB's gfxlib...  (Read 3120 times)

0 Members and 1 Guest are viewing this topic.

Offline Dr_D

  • Atari ST
  • ***
  • Posts: 151
  • Karma: 29
    • View Profile
Fun with FB's gfxlib...
« on: December 19, 2006 »
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!!!

Offline DrewPee

  • I Toast Therefore I am
  • Pentium
  • *****
  • Posts: 563
  • Karma: 25
  • Eat Cheese - It's good for you!
    • View Profile
    • Retro Computer Museum
Re: Fun with FB's gfxlib...
« Reply #1 on: December 19, 2006 »
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

Offline DrewPee

  • I Toast Therefore I am
  • Pentium
  • *****
  • Posts: 563
  • Karma: 25
  • Eat Cheese - It's good for you!
    • View Profile
    • Retro Computer Museum
Re: Fun with FB's gfxlib...
« Reply #2 on: December 19, 2006 »
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

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
Re: Fun with FB's gfxlib...
« Reply #3 on: December 19, 2006 »
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:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17378
  • Karma: 497
  • evil/good
    • View Profile
    • My Homepage
Re: Fun with FB's gfxlib...
« Reply #4 on: December 19, 2006 »
I didn't know you could draw stuff over the desktop like that with FB :) + Karma.
Shockwave ^ Codigos
Challenge Trophies Won:

Offline .:] Druid [:.

  • freebasic n00b
  • Pentium
  • *****
  • Posts: 563
  • Karma: 47
    • View Profile
    • Intro-Inferno
Re: Fun with FB's gfxlib...
« Reply #5 on: December 19, 2006 »
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.

Offline Dr_D

  • Atari ST
  • ***
  • Posts: 151
  • Karma: 29
    • View Profile
Re: Fun with FB's gfxlib...
« Reply #6 on: December 19, 2006 »
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!!!

Offline psygate

  • Completly Insane.
  • Atari ST
  • ***
  • Posts: 173
  • Karma: 7
  • That boy needs therapy.
    • View Profile
Re: Fun with FB's gfxlib...
« Reply #7 on: December 29, 2006 »
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.

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: Fun with FB's gfxlib...
« Reply #8 on: December 29, 2006 »
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:

Offline Dr_D

  • Atari ST
  • ***
  • Posts: 151
  • Karma: 29
    • View Profile
Re: Fun with FB's gfxlib...
« Reply #9 on: December 29, 2006 »
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!!!

Offline psygate

  • Completly Insane.
  • Atari ST
  • ***
  • Posts: 173
  • Karma: 7
  • That boy needs therapy.
    • View Profile
Re: Fun with FB's gfxlib...
« Reply #10 on: December 30, 2006 »
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.

Offline Dr_D

  • Atari ST
  • ***
  • Posts: 151
  • Karma: 29
    • View Profile
Re: Fun with FB's gfxlib...
« Reply #11 on: December 31, 2006 »
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!!!

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: Fun with FB's gfxlib...
« Reply #12 on: December 31, 2006 »
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:

Offline psygate

  • Completly Insane.
  • Atari ST
  • ***
  • Posts: 173
  • Karma: 7
  • That boy needs therapy.
    • View Profile
Re: Fun with FB's gfxlib...
« Reply #13 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!
He who controlles the minds commands the many.
He who commands the many, conqueres the minds.

Offline Dr_D

  • Atari ST
  • ***
  • Posts: 151
  • Karma: 29
    • View Profile
Re: Fun with FB's gfxlib...
« Reply #14 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!!!

Offline psygate

  • Completly Insane.
  • Atari ST
  • ***
  • Posts: 173
  • Karma: 7
  • That boy needs therapy.
    • View Profile
Re: Fun with FB's gfxlib...
« Reply #15 on: December 31, 2006 »
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.