English
Opportunities and suggestions

X11Beta6: Default-position the Mainwindow Centered

 
Default-position the Mainwindow Centered

If one now Window with only 2 Parameters aufruft would like one on the dearest herewith a new Size for the zentrierte Window determine - what the whole round down would.
CompileMarkSeparation
I faith with z.B. window 320,200 would like to the objectively 320x200 Pixel Innenfläche to that draw present are.

another small Info: best to investigation the middle with the Workarea calculate there Specifically under Vista gladly Toolbars and Co. on whom Seitenrändern paste:
CompileMarkSeparation
Source wurde am 22.07.2007 in die Babyklappe auf XProfan.Com abgelegt:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
FA: Fenster immer mit Maximalgrösse öffen und
dabei alle möglichen Taskbar-Breiten und -
Positionen beachten
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DEF SPI(4) ! user32,SystemParametersInfoA
Declare Rect#,x&,y&,b&,h&
Dim Rect#,16
SPI(48,0,Rect#,0)  SPI_GETWORKAREA,,0,Rect,0
x&=Long(rect#,0)
y&=Long(rect#,4)
b&=Long(rect#,8)
h&=Long(rect#,12)
Windowstyle 512+31
Window x&,y&-b&,h&
Dispose Rect#
waitinput
end
 
11/22/07  
 




Jac
de
Lad
is the now one wish or new in s6?

I find both ideas class, with the the Workarea would itself Yes to that example a new Style declarieren let: z.B. 1024 = indicated is Workarea...

Jac
 
Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE)
Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP
11/22/07  
 



Default-position the Mainwindow Centered

this is one Fakt since X11Beta6! Roland Centered So the Mainwindow, z.B. at first Print or Cls.

my 2-Parameter-Window was only a idea around the thing abzurunden!

1024 is already as Window Style occupied with ToolWindow! 2048 would there well spare but imho not necessary if one Window with 2 Parameters Call could.
 
11/22/07  
 




Jac
de
Lad
Aso.

Well, but if to the Mainwindow Center wants and not The Clientarea means, wärs Mist, means ought to the a Windowstyle get.

nice wärs too, if the Center with Create(Window and Create(dialog functions would.

Jac
 
Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE)
Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP
11/22/07  
 



@Jac

I mach the always so:
CompileMarkSeparation
Declare _dlg&,breite%,hoehe%
breite%=900:hoehe%=400 sind auch nur zwei Eingaben ;)
_dlg&=CREATE(DIALOG,%HWND,,(%MaxX/2-(breite%/2)),(%MaxY/2-(hoehe%/2)),breite%,hoehe%)re>
 
11/22/07  
 




Jac
de
Lad
@Horst: so did i. but this is me always To umständlich. be there something easily. I could me too a Own SubProc write: Create(CenterDialog and Create(CenterWindow...but one kanns indeed time here place.
 
Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE)
Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP
11/22/07  
 



@Jac
are You of profession tired ?
plainer goes it still not - see The small PROC
CompileMarkSeparation
PROC DIALOG_CENTER

    Declare _dlg&
    PARAMETERS _Dstil%,_Dmodus$,_Dbreite%,_Dhoehe%,_Dtitel$
    WindowStyle _Dstil% wenn _Dmodus$ = Dialog:dann als Parameter 0 eingeben
    _dlg&=CREATE(_Dmodus$,%HWND,_Dtitel$,(%MaxX/2-(_Dbreite%/2)),(%MaxY/2-(_Dhoehe%/2)),_Dbreite%,_Dhoehe%)

ENDPROC

declare txt%
dialog_center 48,WINDOW,500,300,Zentriertes Fenster
waitinput
11/22/07  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

2.294 Views

Untitledvor 0 min.
H.Brill01/12/21
Peter Max Müller10/07/17

Themeninformationen

this Topic has 3 subscriber:

Jac de Lad (3x)
unbekannt (2x)
iF (2x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie