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 / How do I turn off/disable window resizing?

Author
Message
Jjsaro
9
Years of Service
User Offline
Joined: 21st May 2014
Location:
Posted: 11th Jul 2014 20:26
I want to make sure the window my game is run in can't be re-sized. How?
Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 12th Jul 2014 02:49
I'm unable to look it up further at the time of writing this but it should be some window style that you set for the main window so you can look into that.


"Why do programmers get Halloween and Christmas mixed up?"
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 12th Jul 2014 05:23 Edited at: 12th Jul 2014 05:28
What Rudolpho said. This is the function I use.

MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 12th Jul 2014 11:26
Or for a more friendly version...



Remember to press F1 while highlighting a command or after single clicking on one... also observe the status bar across the bottom too, very handy!

Hope this helps...

[Note: Experiment with the Style numbers from 0 to 4, above it is currently set to 3]

WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 12th Jul 2014 18:04 Edited at: 12th Jul 2014 18:57
Friendlier, yes. But, what about window maximize? Which is a form of window resize.

Edit: You may ask, then why are you using - set window layout? The DBPro internals need to be aware that window resize is disabled or when moving the window strange artifacts will be left.
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 12th Jul 2014 19:38
I would have thought you wanted to avoid Video Flush which is caused on resizing, maximize does not cause this to occur, but there is a mode that removes the outer frame entirely, just play with the style numbers and you should see it...

WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 12th Jul 2014 19:51 Edited at: 12th Jul 2014 19:55
Quote: "I would have thought you wanted to avoid Video Flush which is caused on resizing, maximize does not cause this to occur"


What the hell are you talking about? Alt-tabbing out of exclusive fullscreen mode, locking the system or changing display settings will flush the video. Resizing the window does not do this.
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 12th Jul 2014 19:53
Resizing and maximise are two different things, try re-reading my post ✉ again...

WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 12th Jul 2014 20:01
Quote: "Resizing and maximise are two different things"


Yes, I get this, that is the reason I'm changing two bits in the window style. Still not getting your meaning. Could you elaborate.
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 12th Jul 2014 20:38 Edited at: 12th Jul 2014 20:39
Cannot recreate the crash I had last night [Did not save the code and was tired so cannot recall...]

But this works even if they click on maximize...

It works so well for the requirements you asked for help with, check if Matrix1Utils has a similar function for the ones marked below...



Do you know what Matrix1Utils is?

EDIT

Removed space in code

WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 12th Jul 2014 21:41 Edited at: 12th Jul 2014 21:44
I did not ask for anything. The OP asked how to prevent the window from resizing. What possible reason would someone want to disable window resize without also disabling maximize. Personally, I don’t bother with it anymore.

Do not own the STYX plug-in, but the code is easy to figure out, seems redundant. I do have the Matrix1Utils plug-in, although I do not have it installed. I do not use it, the most useful functions I have implemented in my own plug-in.
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 12th Jul 2014 22:03
I must be tired, working for a week straight with just a few hours sleep can really take its toll...

Why I even paid any attention to you is beyond me...

Quote: "without also disabling maximize. "


SET WINDOW LAYOUT 0,0,0 Removes everything, so what maximize are you talking about?

Anyway I think this question has been answered, have a nice day

WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 12th Jul 2014 22:07 Edited at: 12th Jul 2014 22:09
You have a nice day, yourself. And get some rest.
Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 12th Jul 2014 23:10
Quote: "It works so well for the requirements you asked for help with, check if Matrix1Utils has a similar function for the ones marked below..."

It probably does work but won't that still allow you to drag the window (as in resizing it) and then it resets once you let go of the mouse? Disabling window resizing won't let you drag its borders at all. Also a window without the standard borders just look plain ugly (in my opinion) unless you add some kind of borders yourself, but that's a matter of personal preferrence of course.


"Why do programmers get Halloween and Christmas mixed up?"
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 12th Jul 2014 23:20
Hej Rudolpho

The code on that post snaps the window back to the centre position [or starting position anyway ] and because of SET WINDOW LAYOUT 3,0,0 the frame remains but the stretching resize is disabled, I added the state if block because without it, it would pop back up when minimised... quite funny actually

Login to post a reply

Server time is: 2024-04-23 09:28:54
Your offset time is: 2024-04-23 09:28:54