| |
|
|
Georg Teles | is The Extension [...] CompileMarkSeparation'###########################################
'# #
'# Snippet von Georg Teles am 09.10.2014 #
'# #
'###########################################
$H Windows.ph
Def GetMonitorInfoA(2)!"user32","GetMonitorInfoA"
Def MonitorFromWindow(2)!"user32","MonitorFromWindow"
Def GetAsyncKeyState(1) ! "user32.dll","GetAsyncKeyState"
Struct RECT = left&,top&,right&,bottom&
Declare rcMonitor#, rcWork#
Dim rcMonitor#, RECT
Dim rcWork#, RECT
STRUCT MONITORINFO = cbSize&, rcMonitor#(16), rcWork#(16), dwFlags&
Declare mon#
Dim mon#, MONITORINFO
mon#.cbSize& = SizeOf(mon#)
CLS
' Information das erste mal in mon# einlesen
GetMonitorInfoA(MonitorFromWindow(%HWnd,2),mon#)' für OK gibt 1 zurück, 0 = Fehler
info()
Usermessages $201
While 1
Waitinput
Case %UMessage=$201 : movebymouse()
info()
EndWhile
Dispose rcWork#
Dispose rcMonitor#
Dispose mon#
Proc movebymouse
Parameters m&
Declare mpos#, x1&, y1&
Dim mpos#,8
~GetCursorPos(mpos#)
var wix&=%winLeft-long(mpos#,0)
var wiy&=%winTop-long(mpos#,4)
While iskey(1)
Sendmessage(%hwnd,$0112,$0F012,0)
EndWhile
' deren (vom aktiven Monitor) Workarea ermitteln erst nachdem das Fenster auf diesen Monitor verschoben wurde
GetMonitorInfoA(MonitorFromWindow(%HWnd,2),mon#)
~GetCursorPos(mpos#)
x1&=(long(mpos#,0)+wix&)
case x1&<workarea("Links") : x1&=workarea("Links")
case x1&>workarea("Rechts")-(%winRight-%winLeft) : x1&=workarea("Rechts")-(%winRight-%winLeft)
y1&=(long(mpos#,4)+wiy&)
case y1&<workarea("Oben") : y1&=workarea("Oben")
case y1&>workarea("Unten")-(%winBottom-%winTop) : y1&=workarea("Unten")-(%winBottom-%winTop)
setWindowPos %hWnd=x1&,y1& - (%winRight-%winLeft),(%winBottom-%winTop);0
Dispose mpos#
EndProc
Proc workarea
Parameters position$
Declare x%
case position$="Links":x%=Long(mon#,20)
case position$="Oben":x%=Long(mon#,24)
case position$="Rechts":x%=Long(mon#,28)
case position$="Unten":x%=Long(mon#,32)
Return x%
EndProc
Proc info
CLS
print "cbSize&: ";Long(mon#,0)
print
print "hMon X: (left) - ";Long(mon#,4)
print "hMon Y: (top) - ";Long(mon#,8)
print "hMon W: (right) - ";Long(mon#,12)
print "hMon H: (bottom) - ";Long(mon#,16)
print
print "WORK X: (left) - ";Long(mon#,20)
print "WORK Y: (top) - ";Long(mon#,24)
print "WORK W: (right) - ";Long(mon#,28)
print "WORK H: (bottom) - ";Long(mon#,32)
print
print "dwFlags&:";Long(mon#,362>)
ENDPROC
|
|
|
| |
|
|
|
| |
|
| |
|
|
|
Georg Teles | One friend said me as it my Codes seen having (PHP), at program as much as possible To to comment & auszuschreiben, Übersichts- & Verständlichkeitshalber for others Programmer, it power it too professional & it works several people in a proposition. the was but here unnecessary Nebeninfo have simply to the Solution for several monitors sought & for others nachvollziehbar umschrieben How in the previous Workarea or. from Laziness let ... all joking aside
Yes the bid itself In any accrue, The xpse Variante gefällt me best.
be too the opinion so little How possible To write & plenty How possible abzukürzen, with finished Programs entferne I even vain zeilen, Tabs & space |
|
|
| |
|
|
|
| Georg Teles (10.10.14)
with finished Programs entferne I even vain zeilen, Tabs & space
Irghh.
the tätentut the xpse in the "enh"-File The it to that XProfan-Kompilierer gives.
I promise me not against comments in the fountain from separate sooner against "unnötigen" Prozessoraufwand beziehungsweise against little-effizienten code.
with functions as here with the Workarea is the presumably wumpe since the function vmtl. hardly regularly called becomes.
wished too only bisl Klugscheißen, make I regularly - Profilneurosen. |
|
|
| |
|
|
|
Georg Teles | ( I said indeed unnecessary of me Info, the first set ) I entferne The Lines because I with XPSE only kompiliere, if it circa nProc's goes ... Yes there have you got right, from little How possible as much as possible herauszuholen & elegant How possible formulieren, is the art in the program ( & optimiert is it Yes then automatically or = optimiert, then is it perfect ) |
|
|
| |
|
|
|
| perfect Better get going never.
though the again too to such one set How sounds like the there sounds: "weltweiter want on homecomputern max 5" -
not even with the testimony the one itself always irrt can not brill |
|
|
| |
|
|
|
Georg Teles | If one itself 100% sure is can itself nevertheless brill, the is correct ... our Physiklehrer said time: "wenn I The hand to my face stops, be I I do not sure, whether between my eyes and the hand nothing (not breeze meant) is, because I see only the, what my eyes me zeigen"
severe taken are zB. physikalische Gesetzte Annäherungen on The truth through Kalkulation, sometimes based on Beobachtungen, analysis, Auswertung, ... of assembled data --- with menschlichen Emotionen can the word "Cool" a integrally others weight & Empfindungen with you herforrufen as by me or anyone else, even if one situationally it correctly. aufnimmt, can it To Missverständnissen lead if man it exactly takes
perfect was code diction of me, it'll objectively nothing perfect his |
|
|
| |
|
|
|
| |
|
| |
|
|
|
Georg Teles | would there the word go stand, were it no bow:
it'll objectively nothing perfect go
I give to, the perfect is (already) perfect & becomes furthermore perfect his |
|
|
| |
|
|
|
| Georg Teles (11.10.14)
... & becomes furthermore perfect his
are we now means successful in the country the Spekulationen arrived? |
|
|
| |
|
|
|
Georg Teles | shining so To his |
|
|
| |
|
|