Smart Client starts up "minimized"

Questions, answers, tips and ideas on Servoy Client

Smart Client starts up "minimized"

Postby michel » Thu Mar 18, 2010 10:22 am

On some systems running vista the smart client starts up "minimized". That is, after the smart client is started it shows up in the windows task bar, the title bar is shown maximized on top of the screen without the rest of the window (so only the title bar is displayed).
When the button in the windows task bar is clicked, the title bar disappears and the smart client is now a normal minimized application. After clicking the button in the windows task bar again the smart client window is shown like it should and works correctly.
Does anyone recognize this effect?
Michel van Klink
Vision Development
michel
 
Posts: 186
Joined: Mon Sep 22, 2008 10:53 am
Location: Boskoop, The Netherlands

Re: Smart Client starts up "minimized"

Postby mboegem » Thu Mar 18, 2010 11:47 am

Hi Michel,

I recognize this from other applications also on XP. I don't think it's a Servoy specific issue.
We don't have this problem running the smart client, as we save the last state of the window as an user property and recall this at startup.
Doing this you'll never get into trouble as it is user + client specific storage of this data.

Maybe this can help you.
Marc Boegem
Solutiative / JBS Group, Partner
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

Image

Partner of Tower - The most powerful Git client for Mac and Windows
User avatar
mboegem
 
Posts: 1743
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam

Re: Smart Client starts up "minimized"

Postby michel » Tue Mar 23, 2010 10:49 am

Storing these user properties and recall them at startup works okay on normal windows but does not work correctly on maximized window (icon next to the close icon in the window title bar is different than that of a normal window). In that case application.getWindowX() and application.getWindowY() both return -4, passing this to application.setLocation() does not show a maximized window, but shows the window on location (2, 10) approximately.
Michel van Klink
Vision Development
michel
 
Posts: 186
Joined: Mon Sep 22, 2008 10:53 am
Location: Boskoop, The Netherlands

Re: Smart Client starts up "minimized"

Postby mboegem » Tue Mar 23, 2010 10:56 am

michel wrote:application.getWindowX() and application.getWindowY() both return -4


that's correct (forgotten about this), anyway we've worked around this by requesting screen size (H&W) and resize the window to the max. possible for this screen.
not exactly maximized, but anyway workable (for us...)
Marc Boegem
Solutiative / JBS Group, Partner
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

Image

Partner of Tower - The most powerful Git client for Mac and Windows
User avatar
mboegem
 
Posts: 1743
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam

Re: Smart Client starts up "minimized"

Postby michel » Tue Mar 23, 2010 11:06 am

Possible, but then i have a problem with my windows taskbar...
Michel van Klink
Vision Development
michel
 
Posts: 186
Joined: Mon Sep 22, 2008 10:53 am
Location: Boskoop, The Netherlands

Re: Smart Client starts up "minimized"

Postby Harjo » Tue Mar 23, 2010 12:14 pm

michel wrote:Possible, but then i have a problem with my windows taskbar...

Indeed, we worked around that also, by limiting the height, but I agree, Servoy should have a function, to maximize the screen.

maybe this is already possible with plain Java? I dont know.....
Let some Java -guru's answer that :-)

Found a real old topic about this: http://forum.servoy.com/viewtopic.php?f ... 31&start=0
with Johan arguing that he was against this..
I'm also not a big fan, of solutions, that do this EVERY time at start-up, but the servoy-client starts up default so small, that just one maximize is enough.
Johan, look at microsoft Office, OpenOffice, they ALL start maximized the first time ;-)
Harjo Kompagnie
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: Smart Client starts up "minimized"

Postby mboegem » Tue Mar 23, 2010 12:31 pm

Harjo wrote:I'm also not a big fan, of solutions, that do this EVERY time at start-up


don't have to... if we just had the function to do it, we will let the user decide what (s)he wants... :D

I've seen Paul Bakker promising something like this function in his soon to be available 'Tools' plugin.... If I'm not mistaken that was 2004, so I guess he should have it available by now.... :wink:

@Paul: can you help us out here?
Marc Boegem
Solutiative / JBS Group, Partner
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

Image

Partner of Tower - The most powerful Git client for Mac and Windows
User avatar
mboegem
 
Posts: 1743
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam

Re: Smart Client starts up "minimized"

Postby jcompagner » Tue Mar 23, 2010 4:01 pm

Harjo wrote:
Found a real old topic about this: viewtopic.php?f=2&t=2531&start=0
with Johan arguing that he was against this..
I'm also not a big fan, of solutions, that do this EVERY time at start-up, but the servoy-client starts up default so small, that just one maximize is enough.
Johan, look at microsoft Office, OpenOffice, they ALL start maximized the first time ;-)


in Servoy 6 the plan is that windows get a bit nicer api so that servoy developers can control it a bit better.
Not everything is in stone but we could add something like
boolean setState(JSWindow constant)

And that window constant can then be JSWindow.minimized, JSWindow.maximized, JSWindow.normal
things like that.

But as you all know, i am against those setSize and setLocation all the time. That should only happen once.
So we could add besides setSize/setLocation/setState methods like:
setInitialXxxx()
And that is only used when the window (name) you now show is not yet know, if it is known (stored in settings) then initial will be ignored.

This way you can configure the default size and position for the main and all other windows, but let the user decide from then on where it wants it.
And servoy also takes care of remembering the settings throughout restarts for all the named dialogs/windows you have.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8829
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet


Return to Servoy Client

Who is online

Users browsing this forum: No registered users and 7 guests

cron