Start app maximized?


#1

Hi all,

Quick and simple question, can’t find it in the docs nor with a forum search.

I’m running my app with the native win32 windowframe.
How do i start my juce app maximized ?

Radiance


#2

Hi,
I haven’t tried it myself but you can give it a try. If your main window is a juce window, You can do this in your main window class.

getMaximiseButton()->setToggleState(true,true);

#3

…doesn’t setFullScreen (true) do the trick?

(I wouldn’t recommend trying to use the button state to trigger it - it might work but is a bit hacky)


#4

Hi Jules,
What about the maximize button state? Will that change to ON if setFullScreen (true) is used. I thought of using setFullScreen, but decided against doing it because I was worried about the button state.


#5

The buttons will follow the window’s state - if they don’t then that’d be a bug! The window could be maximised by other means than clicking the button, so they need to respond to that.

Besides, if you use a native titlebar, there are no buttons that you can use like this.


#6

Oh okay.:oops:
Thanks Jules.


#7

so is it possible with a native titlebar or not ?

Thnx,
Radiance


#8

Like I said: “setFullscreen (true)”. Or are you saying that this isn’t working properly?


#9

“setFullscreen (true)” should work. I have used “setMinimised(true)”, which minimizes the window, so there shouldn’t be any problems with “setFullscreen”.


#10

Like I said: “setFullscreen (true)”. Or are you saying that this isn’t working properly?[/quote]

yup, problem solved :slight_smile:

I was a bit confused by the discussion regarding the use of the juce window buttons…

Thnx!,
Radiance


#11

I apologize it’s all my fault. May be “I Can’t think straight” :frowning: