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 / How to change windows Width and Height and make a .exe file?

Author
Message
Ihsan_Cingisiz
14
Years of Service
User Offline
Joined: 6th Jan 2011
Location: The Netherlands
Posted: 6th Jan 2011 18:06
Hello,

I made a "Keystate-Finder" with a tutorial on YouTube.
The script:


And when i execute this i get a bigger screen, i think 640x480
with the text on the left top side. I want to make the screen
width and heigth: 196x128, but i don't know how. And after this
how can i make my script just a .exe file so that everyone that doesn't have DarkBasic can execute it?

I hope this information was enough to get helped.

Kind regards,
I. C.
Mobiius
Valued Member
22
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 6th Jan 2011 19:49 Edited at: 6th Jan 2011 19:50

Running it makes it an Exe file. If you have a project file saved, it'll be created there, if you don't then it'll be in the temp folder.

My signature is NOT a moderator plaything! Stop changing it!
SH4773R
15
Years of Service
User Offline
Joined: 18th Jan 2010
Location: AMERICA!!!
Posted: 6th Jan 2011 19:55
Yes, and yes use the set screen reseluton(hight,width) command (resultion is speld wrong I pretty shure)
then to make exe just run it or compile it go to your dbpro folder click on projects, fiind your project folder there should be a. Exe called applaction.exe teres your app rename it if u like
SH4773R
15
Years of Service
User Offline
Joined: 18th Jan 2010
Location: AMERICA!!!
Posted: 6th Jan 2011 20:43
lol you posted right when i started typing.
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 6th Jan 2011 21:42
You can set the opening windows resolution to pretty much anything. The resolutions you can choose within the IDE is pretty much a pre-chosen and artificially restricted set, but you don't have to stick with them.

Open up your .dbpro file using notepad (or any text editor really), locate the line starting 'window resolution=', and change the numbers to match your requirement.

Open up your project using the standard IDE and you'll see that it has your resolution showing - don't select the dropdown box as you'll then need to edit the .dbpro file again to reset it. Just compile your program at this point and it'll have your selected window size.

Green Gandalf
VIP Member
20
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 8th Jan 2011 13:20
Quote: "Open up your .dbpro file using notepad (or any text editor really), locate the line starting 'window resolution=', and change the numbers to match your requirement."


Why do you need to do that?

Depending on what the original poster needs, the following seems to work directly from the IDE:



The Screen settings in the Properties tab of the editor are:

Screen Type: fulldesktop
Window Resolution: 640x480
Fullscreen resolution: 1680x1050x32.

Perhaps I've missed something?

Quote: "And after this
how can i make my script just a .exe file so that everyone that doesn't have DarkBasic can execute it?"


I don't think you can. I believe they need to have suitable versions of DirectX installed even if the program isn't doing any 3D stuff (unless you can exclude parts from the compilation process somehow ).
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 8th Jan 2011 19:06
Quote: "Perhaps I've missed something?"

Maybe. The window is created with the initial size specified by the IDE, then is resized to the size specified in code - depending on timing, you can see the window resize from larger to smaller.

If you hack the size into the .dbpro file, the initial window is the correct size in the first place.

Green Gandalf
VIP Member
20
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 8th Jan 2011 20:45
If it's that instantaneous is there any need to edit the .dbpro file? I still think I'm missing the point here.
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 8th Jan 2011 23:23
The point is that it isn't instantaneous.

On a wizzy machine with nothing running, it may seem that way, but on a not-so-wizzy system you can see the initial window before it resizes.

Indicium
17
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 8th Jan 2011 23:34
On mine for example.

Green Gandalf
VIP Member
20
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 8th Jan 2011 23:44
Ok.

Login to post a reply

Server time is: 2025-05-29 06:04:06
Your offset time is: 2025-05-29 06:04:06