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 Discussion / Windows load and save boxes

Author
Message
pictionaryjr
11
Years of Service
User Offline
Joined: 12th Mar 2009
Location:
Posted: 31st Jan 2011 05:10
Is there anyway to use the windows load and save boxes so i don't have to code my own every single time.

BN2 Productions
16
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 31st Jan 2011 06:14
You might be able to use a visual basic script, though I can't confirm that one.

Great Quote:
"Time...LINE??? Time isn't made out of lines...it is made out of circles. That is why clocks are round!" -Caboose
pictionaryjr
11
Years of Service
User Offline
Joined: 12th Mar 2009
Location:
Posted: 31st Jan 2011 16:38
I either need to establish a basic function or something because it sucks doing it

Libervurto
14
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 31st Jan 2011 19:43 Edited at: 31st Jan 2011 19:48
I believe TDK made a set of basic GUI functions, and a load/save window was one that he included.


Everything worthwhile requires effort.
Latch
14
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 31st Jan 2011 20:32 Edited at: 31st Jan 2011 20:33
@pictionary
It's possible with windows. You need a few memblocks to mimic the structures needed but it's possible. If you are just interested in a save load and don't need it to be windows api specific, then as Obese suggested, try TDKs, or perhaps try Freddix's :

Go through the entire thread because there are changes and updates as it moves along.
TDK gui stuff

Freddix misc.

Enjoy your day.
Jmahmood
13
Years of Service
User Offline
Joined: 3rd Apr 2007
Location: not sure
Posted: 15th Feb 2011 16:43 Edited at: 15th Feb 2011 16:44
You might find this handy,download the attached dll and try the code.



One thing though,It doesn't work too well when you're in full screen mode.

Attachments

Login to view attachments
pictionaryjr
11
Years of Service
User Offline
Joined: 12th Mar 2009
Location:
Posted: 15th Feb 2011 21:50
pretty impressive. can i ask what program you used to make it?

Jmahmood
13
Years of Service
User Offline
Joined: 3rd Apr 2007
Location: not sure
Posted: 17th Feb 2011 07:09
I didn't make the dll.I also don't remember how I got it.
I used it in my Real Time Modeler project back in 2007.

It's probably a windows dll that I collected from the forum.
pictionaryjr
11
Years of Service
User Offline
Joined: 12th Mar 2009
Location:
Posted: 17th Feb 2011 18:11
o regardless. it proves very promising despite the fact it can't be used in full screen mode

Latch
14
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 19th Feb 2011 17:36
@pictionaryjr

The following link may be helpful as it talks about one of the challenges I ran into when implementing windows dialog boxes:

Dragging Dialog wipes out background

Enjoy your day.
pictionaryjr
11
Years of Service
User Offline
Joined: 12th Mar 2009
Location:
Posted: 19th Feb 2011 21:22
now. would that allow the windows dialog box to be used in full screen mode?

Jmahmood
13
Years of Service
User Offline
Joined: 3rd Apr 2007
Location: not sure
Posted: 20th Feb 2011 15:22
In fullscreen mode only directx is rendered into the screen.Therefor,Windows GUI components will not work until minimized or resized.
Jmahmood
13
Years of Service
User Offline
Joined: 3rd Apr 2007
Location: not sure
Posted: 20th Feb 2011 15:24
Same thing goes for DBpro.That's why BlueGui and stuff like that were invented.
pictionaryjr
11
Years of Service
User Offline
Joined: 12th Mar 2009
Location:
Posted: 20th Feb 2011 18:12 Edited at: 20th Feb 2011 18:12
ah. i see. makes sense

edit:
is it the same in all languages?

Latch
14
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 20th Feb 2011 20:44
Quote: "In fullscreen mode only directx is rendered into the screen.Therefor,Windows GUI components will not work until minimized or resized."

Yes, mostly true. But, if you run the gui components as "their own thing" meaning they aren't necessarily children of the darkbasic window, you can get away with using some of them.

This code adds a Windows status bar at the bottom of a DBC window in fullscreen mode. Without it being in Window mode, you'll notice the mouse passes behind the status bar:



DBC is able to talk to the status bar because we have the window handle (memory pointer) to it so we can use a Windows API function to make a call to that handle.

Now similarly, we can access the common dialogs (like choose color, or choose font, or file select) if we get the right handles, create the right memory pointers for the structures that the dialogs need , and so forth. But if we are in fullscreen mode, we won't be able to easily control these dialogs with the mouse. We can't see it! DBC fullscreen mode has changed the pointer to a Direct x sprite or something. But you should still be able to control the dialogs with the arrow keys, the tab key and ESC and ENTER. You could try controlling it with the mouse, but you won't know where you are pointing or clicking until you see something change.

Here's a font dialog. In full screen mode, use the tab key to move between fields. Use the arrow keys to highlight the selection. Press Enter to accept ALL of the changes, or ESC to leave the dialog box.



Enjoy your day.

Login to post a reply

Server time is: 2020-08-06 08:49:14
Your offset time is: 2020-08-06 08:49:14