English
Forum

Mainwindow move

 

Thomas
Freier
in the principle Yes no trouble, however can I it to supra only circa ca. 20px move.
falser Script or physikalische boundary?
Def Capture Release(0) !"USER32","ReleaseCapture"
SetTrueColor 1
Windowstyle 82
window 0,0 - 0,0
var hwnd&=%hwnd
var hwndX%=0
var hwndY%=0
SetWindowPos hwnd&=hwndX%,hwndY% - 1120,800;0
USEP 0,0,rgb(0,0,0)
Rectangle 0,0-1120,800
USEP 2,0,rgb(0,0,0)
Line 0,10-40,10
Line 0,20-40,20
Line 0,30-40,30
Line 0,40-40,40
Line 0,50-40,50
Rectangle 60,60-1060,740
DrawText 140,360,"Dieses Window with linker gedrücker Mouse button move."
DrawText 140,460,"Dieses Window with Button 'Esc' or 'old' plus 'F4' close."
SubClass hwnd&,1

while 1

    WaitInput
    case %key=27:break

wend

SubClass hwnd&,0
end

SubClassProc

    If %message = $201

        UseCursor 5
        SendMessage(%hwnd,$112,$F012,0)
        Capture Release()
        UseCursor 0

    EndIf

ENDPROC

 
Gruß Thomas
Windows XP SP2, XProfan X2
12/04/10  
 




Rolf
Koch
So I schiebe here the window on the whole Desktop hither and thither and Have no border, even from the Sichtbereich out. or Have I what wrong understood?
 
12/04/10  
 




Thomas
Freier
Rolf, the have you got correctly. understood. On my Laptop can I the window to supra only integrally little move. left, right and down To from the Sichtbereich. is well again BS and geräteabhängig.
 
Gruß Thomas
Windows XP SP2, XProfan X2
12/04/10  
 



by me jumping the window on Y-position 0 back if I it to supra out schiebe.

Selberschieben make I so: Download
CompileMarkSeparation
 {$cleq}
'URL: https://xprofan.com/intl/de/forum/hauptfenster-verschieben/
 {$compiler c:\xprofan11}
 {$runtime c:\xprofan11}
#include c:\dev\mouse.inc
SetTrueColor 1
Windowstyle 82
window 0,0 - 0,0
var hwnd&=%hwnd
var hwndX%=0
var hwndY%=0
SetWindowPos hwnd&=hwndX%,hwndY% - 1120,800;0
UsePen 0,0,rgb(0,0,0)
Rectangle 0,0-1120,800
UsePen 2,0,rgb(0,0,0)
Line 0,10-40,10
Line 0,20-40,20
Line 0,30-40,30
Line 0,40-40,40
Line 0,50-40,50
Rectangle 60,60-1060,740
DrawText 140,360,"Dieses Fenster bei linker gedrücker Maustaste verschieben."
DrawText 140,460,"Dieses Fenster mit Taste 'Esc' oder 'Alt' plus 'F4' schließen."
userMessages wm_close,wm_lButtonDown

while 1

    WaitInput
    case %key=27:break

    select %uMessage

        caseof wm_close : break

        caseof wm_lButtonDown : hWnd.movebyMouse()

    endSelect

wend

end

proc hWnd.movebyMouse

    mouse.getPos()
    var omx&=mouse.x&
    var omy&=mouse.y&
    var wix&=%winLeft
    var wiy&=%winTop
    var xx&=%winRight-wix&
    var yy&=%winBottom-wiy&

    while 1

        casenot lm_() : break
        mouse.getPos()
        setWindowPos %hWnd=(mouse.x&+wix&-omx&),(mouse.y&+wiy&-omy&) - xx&,yy&;0

    wend

./../Function-References/XProfan/endproc/'>endProc


1.036 kB
Hochgeladen:12/04/10
Downloadcounter86
Download
 
12/04/10  
 




Thomas
Freier
very iF. but merkwürdiger point not y = 0, separate on ca. y = -20, if y > -20 his ought to.
 
Gruß Thomas
Windows XP SP2, XProfan X2
12/04/10  
 



is correct...

shows by me -25 ppp -26.

even if 1px Diff. ists vlt. The Titelzeilenhöhe - stell vlt. time your Titelzeilenhöhe on 50 to that Test.
 
12/04/10  
 




Dieter
Zornow
by me GEHTS too, one kanns but too simply with sendmessage make.
 
Er ist ein Mann wie ein Baum. Sie nennen ihn Bonsai., Win 7 32 bit und Win 7 64 bit, mit XProfan X2
12/04/10  
 




Thomas
Freier
is well a problem XP SP2 and the small Completed: the Mouse.inc is by the employment of X11 To to fix.
I find but nothing, around the Titelzeilenhöhe, because this is The boundary, vorzugeben.
 
Gruß Thomas
Windows XP SP2, XProfan X2
12/04/10  
 



look times the systemParametersInfo-API:  [...]  and there vlt. nonClientMetrics:  [...] 
 
12/04/10  
 



Argh - the functions Yes really but "achtung" can I there only say:
cls
struct repairedNONCLIENTMETRICS=cbSize&,iBorderWidth&,iScrollWidth&,iScrollHeight&,iCaptionWidth&,iCaptionHeight&,lfCaptionFont#(60),iSMCaptionWidth&,iSMCaptionHeight&,lfSMCaptionFont#(60),iMenuWidth&,iMenuHeight&,lfMenuFont#(60),lfStatusFont#(60),lfMessageFont#(60)
mem nonClientMetricsStructure=repairedNONCLIENTMETRICS
long nonClientMetricsStructure#,0=sizeof(nonClientMetricsStructure)
systemParametersInfo(SPI_GETNONCLIENTMETRICS,sizeof(nonClientMetricsStructure),nonClientMetricsStructure,0)
print "Zuletzt:",long(nonClientMetricsStructure,4)+long(nonClientMetricsStructure,20)
long nonClientMetricsStructure#,20=5
systemParametersInfo(SPI_SETNONCLIENTMETRICS,sizeof(nonClientMetricsStructure),nonClientMetricsStructure,0)
print systemParametersInfo(SPI_GETNONCLIENTMETRICS,sizeof(nonClientMetricsStructure),nonClientMetricsStructure,0)
print "Nun:",long(nonClientMetricsStructure,4)+long(nonClientMetricsStructure,20)
waitinput
end
 
12/04/10  
 




Thomas
Freier
now, ACHTUNG außeracht let, see I in momentum yet no "hörere Titelzeile" at %hwnd? has me ohnehin, I hätt's me Yes think can, that the only with XPSE runs, some additional gray hairs cost[ed].
 
Gruß Thomas
Windows XP SP2, XProfan X2
12/05/10  
 



its hold plenty faster it with xpse hinzuschreiben - tricky rebuild for not-xpse-usage can it Yes the the worth hereon places or me simply ask if ichs rebuild should/must.

I for my part schreib anyway ungern on something 5 minutes I just as in 2 minutes write can (write we still too rather XProfan as C#?) - would still Quälerei - particularly ifs therefore goes first something auszutesten.

Thomas suitor (05.12.10)
now, ACHTUNG außeracht let, see I in momentum yet no "hörere Titelzeile" at %hwnd?

long nonClientMetricsStructure#,20=5

setting The ("""eigentlich""") on 5 - thereupon watts these by me too very levelly - but not 5. (certainly because the Font larger is as 5)


3 kB
Hochgeladen:12/05/10
Downloadcounter271
Download
 
12/05/10  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

15.226 Views

Untitledvor 0 min.
Thomas Zielinski04/07/21
H.Brill10/11/18
Andre Rohland01/18/15
Donnie03/19/13
More...

Themeninformationen



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