English
Source / code snippets

Window mouse Systemparametersinfo Tastkleiste move Workarea

 
Julian57 (07.08.11)
...
windowstyle 64+16+1024
window 0,0-0,0
SetWindowPos %hwnd=%MaxX-380,(%MaxY-80) - 120,35;-1
User Messages 513
cls RGB(255,0,0)

while 1

    waitinput
    case iskey(27) : end
    case %uMessage=513 : hWnd.moveByMouse

Endwhile

proc hWnd.moveByMouse

    declare mpos#,x1&,y1&, x2&,y2&
    dim mpos#,8
    external("user32","GetCursorPos",mpos#)
    var wix&=%winLeft-long(mpos#,0)
    var wiy&=%winTop-long(mpos#,4)

    while iskey(1)

        external("user32","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

    Endwhile

    dispose mpos#

endProc

Proc workarea

    DEF SysParameterInfo(4) ! "user32","SystemParametersInfoA"
    Parameters position$
    Declare Rect#,x%
    Dim Rect#,16
    SysParameterInfo(48,0,Rect#,0)
    case position$="Links" : x%=Long(Rect#,0)
    case position$="Oben" : x%=Long(Rect#,4)
    case position$="Rechts" : x%=Long(Rect#,8)
    case position$="Unten" : x%=Long(Rect#,12)
    Dispose Rect#
    Return x%

endproc


 
08/07/11  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

3.755 Views

Untitledvor 0 min.
Georg Teles08/11/24
Sven Bader06/27/21
RudiB.04/25/21
Walter04/07/19
More...

Themeninformationen

this Topic has 1 subscriber:

iF (1x)


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