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 / Position window DBC

Author
Message
Insert Name Here
17
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 6th Jun 2007 23:27
I'm making a game in a window as opposed to full screen, and whenever I start the program the window always starts at the top left corner. Is there a way to position the window in a different place?
(Also, I'd like to know how to prevent resizing but that isn't vital).
Thanks

The below sentance is true.
The above sentance is false.
Paradox!
Lucifer
18
Years of Service
User Offline
Joined: 26th Dec 2005
Location:
Posted: 7th Jun 2007 01:08
set window position X, Y


i like pancakes..
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 7th Jun 2007 01:16
What version of DBC are you using? You should be able to use 'SET WINDOW POSITION X,Y'. I am using the enhanced v 1.13. If you can't find this command in the help files, you can get v 1.13 here:
http://darkbasic.thegamecreators.com/?f=upgrade_language

LB
ghtry
16
Years of Service
User Offline
Joined: 6th Jun 2007
Location:
Posted: 7th Jun 2007 06:53
Insert name here:

Researched some of the DBCe commands for windows, and as previously mention you can adjust the window position on your windows desktop using the command SET WINDOW POSITION (x),(y).

As far as preventing users from re-sizing the window, I could not spot a command which actually prevents the window size from being changed. To make matters worse, there is not a command which returns the size of a window you specify. As cheap as this may sound there is indeed a solution to preventing users from changing the size of the window you specify.

Just create a 5 or 10 second timer which constantly sets the window size SET WINDOW SIZE (width),(height). So if the window is re-sized by the end user, your program will get around to setting the size correctly again. I hope this helps.

Best Regards
Anthony
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 7th Jun 2007 08:00
To prevent a window from being resized use the SET WINDOW LAYOUT command:



TDK_Man

Insert Name Here
17
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 7th Jun 2007 22:03
Thanks guys!
That was very useful.
can a mod lock this topic please?

The below sentance is true.
The above sentance is false.
Paradox!
NanoGamez guy
17
Years of Service
User Offline
Joined: 13th Jan 2007
Location: Closer than you think...
Posted: 8th Jun 2007 23:10
Quote: "can a mod lock this topic please"


what's the point?


Nothing is impossible...
No really, it is.
Insert Name Here
17
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 13th Jun 2007 20:33
Because the questions been answered. No-one else needs to post.

The below sentance is true.
The above sentance is false.
Paradox!

Login to post a reply

Server time is: 2024-04-19 05:40:43
Your offset time is: 2024-04-19 05:40:43