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.

Newcomers DBPro Corner / Image Viewer - Help

Author
Message
Rampage
16
Years of Service
User Offline
Joined: 4th Feb 2008
Location: New Zealand
Posted: 7th Jun 2008 10:29 Edited at: 8th Jun 2008 05:34
I'm developing a small piece of software in Visual Basic. And thought
I might shell some DarkBASIC Pro generated exes to show some flashy stuff. Now I am pretty new to DbPro. I have fiddled around with the basics on my friends computer. I have fpsc and dark gdk and stuff.
So, a part of this software is based around an image viewer.
So, can someone tell me please? How can I make a basic image viewer?
By basic I mean like having these arrows at the bottom of the image.

For next image. And

For previous image.
And each time you click next or previous it will change of course.
(with a animation, slide in)
Like this

So it kinda slides in.
Could someone please help? I'm not asking for someone to do it for
me. Just asking for help and instructions.
Thank you everyone.
Edit: The images I want to show are included inside the exe. If this helps.


Visual Game Studio Express Lead Programmer.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 7th Jun 2008 12:55
If you are using the full version of DBPro then there a image side and square program all ready there and its a dll, plus you may know how you might do it with Dark gdk, as it almost the same.

As for what you want I would think that most of the bits are in the demos just rip the bits out you need.

If this is not enough help do shout and someone else will hopefully help.

Dark Physics makes any hot drink go cold.
Rampage
16
Years of Service
User Offline
Joined: 4th Feb 2008
Location: New Zealand
Posted: 7th Jun 2008 13:07 Edited at: 7th Jun 2008 13:21
*SHOUT*
Thanks anyway Yes I'm using full version that a purchased around 5 days ago. But have been busy programming my project.
EDIT: Not to be picky, but could someone please supply me with the code?


Visual Game Studio Express Lead Programmer.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 7th Jun 2008 13:30
In the ide put in 'bitmap fade' and then press F1 then load the demo view bitmap showcase example this should show you a few things that you might want eg clicking a button loading an image.

Dark Physics makes any hot drink go cold.
Rampage
16
Years of Service
User Offline
Joined: 4th Feb 2008
Location: New Zealand
Posted: 8th Jun 2008 07:27
OK, so I tried figuring out my self and made my first REAL program in DarkBASIC Pro.
Here is the code:

Long and boring...yuuup, at least I got a decent image viewer.
Anyway, one problem. Whenever I try to end the program. Its scrolls through all the images semi fast and THEN closes...
How can I fix this to make it so it closes straight away.
I tried coding a

from 1, right down to 26, but it keeps getting errors. Anyone help?


Visual Game Studio Express Lead Programmer.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 8th Jun 2008 10:31
due to the nature of DBPro it actually runs through all the for next loop in the programme when you try to quit it.

So you now have it going, if you look at your code you will see that it repeats a lot of for next loops the same bar the image number, plus you have two choices,

1. load all the images at once 1 to 26 then show them,

or

2. load one at a time into the same image number.




If you do use or try the above it may still show all the pictures on quiting.

If I have jumped ahead of you to far, shout again, say I don't see how this or that works and will try to explain.

"+str$(picture_number)+"
this bit is a way of getting integer numbers into a string.

Dark Physics makes any hot drink go cold.
Rampage
16
Years of Service
User Offline
Joined: 4th Feb 2008
Location: New Zealand
Posted: 8th Jun 2008 10:40
I should be fine from now thanks, all I need in a function that closes the program straight away, just like ending a exe through ctrl+alt+delete. Does such exist? Or do I just stick with end?


Visual Game Studio Express Lead Programmer.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 8th Jun 2008 11:07
where ever the code finds an end thats when it will stop,

if you had,


the end will stop the code from running the function.

I expect given a bit longer and you will be finding better ways of doing the code you are working on.

cheers don't foget to have fun.

Dark Physics makes any hot drink go cold.

Login to post a reply

Server time is: 2024-11-15 20:00:52
Your offset time is: 2024-11-15 20:00:52