delphi - App staying behind taskbar when starting in fullscreen -


this code i'm using:

borderstyle := bsnone; windowstate := wsmaximized; 

my problem application won't cover taskbar, go behind it.

it works fine when switching fullscreen @ runtime, doesn't work when starting app @ system startup.

update

it turns out 2 lines work well. in formshow event handler. if break point until end of formshow, application seems in fullscreen; can see application trough taskbar. after formshow application's top property gets changed somehow. don't change in code - value -20, application not maximized anymore.

is there way track or when changed?

thanks in advance!

update

this post flagged. please not post answers! thank you.

change param style, according msdn blog: http://blogs.msdn.com/b/oldnewthing/archive/2005/05/05/414910.aspx

procedure tform1.createparams(var params: tcreateparams);  begin   inherited;    params.style := ws_popup or ws_visible; //will overlay taskbar end;  procedure tform1.formcreate(sender: tobject); begin   self.windowstate := wsmaximized; //fullscreen end; 

====================================

full code switch windowed fullscreen mode , (tested on win7 64bit, aero)
(edit: works in windows xp (vmware) too)

var   _orgwindowedstyle: dword;  procedure tform6.btnwindowedclick(sender: tobject); begin   self.windowstate := wsnormal;   //set original style   setwindowlong( application.handle, gwl_style,                  _orgwindowedstyle);   //re-create window, use changed style   recreatewnd; end;   procedure tform6.btnfullscreenclick(sender: tobject); begin   _orgwindowedstyle := 0;  //clear: re-applies fullscreen mode in createparams   self.windowstate  := wsmaximized;   //re-create window, use changed style   recreatewnd; end;  procedure tform6.createparams(var params: tcreateparams); begin   inherited;    //first time? default fullscreen   if _orgwindowedstyle = 0   begin     _orgwindowedstyle := params.style;     params.style := //ws_popup or               //not needed?                     ws_visible                     or ws_border or ws_caption  //comment line remove border + titlebar   end; end;  procedure tform6.formcreate(sender: tobject); begin   self.windowstate := wsmaximized;     //default fullscreen end; 

Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -