English
Source / code snippets

one Window Fensters Positionsinformationen status

 

Source watts on the 15.07.2007 from the MMJ-Quellcodesammlung (Dietmar horn) in The Babyklappe on XProfan.Com stored:
Window: status- and Positionsinformationen one Fensters
Def @Getwindowplacement(2) !USER32,GetWindowPlacement
Def @Getlasterror(0) !KERNEL32,GetLastError
Declare Notepad_handle&,Statusinfos&,Fehler&,Windowplacement#,Activewindow&,Setstate&,Show$
Windowstyle 31
Windowtitle status and Positionsinformationen one Fensters
Window 0,0-640,440
Let Statusinfos&=@Createbutton(%Hwnd,Statusinfos read,20,100,200,30)
Let Setstate&=@Createbutton(%Hwnd,Fensterstatus settle,20,150,200,30)
Case @Findwindow(Untitled - editor)=0 : @Winexec(NOTEPAD.EXE,1)
Let Notepad_handle&=@Findwindow(Untitled - editor)
@Showwindow(%Hwnd,2)
@Showwindow(%Hwnd,1)

While 0=0

    Let Activewindow&=@Getactivewindow()
    Sleep 100

    If @Getfocus(Statusinfos&)

        @Setactivewindow(Activewindow&)
        Clearlist
        Addstring Fensterhandle=+@Str $(Notepad_handle&)
        Dim Windowplacement#,44
        Clear Windowplacement#
        Long Windowplacement#,0=44
        Addstring last API-Error=+@Str $(@Getlasterror())
        Let Fehler&=@Getwindowplacement(Notepad_handle&,Windowplacement#)
        Addstring Return of GetWindowPlacement=+@Str $(Fehler&)
        Addstring last API-Error=+@Str $(@Getlasterror())
        Addstring Fenstererzeugungsflags=+@Str $(@Long(Windowplacement#,4))

        If @Long(Windowplacement#,4) | $2=@Long(Windowplacement#,4)

            Addstring Window becomes with the Erzeugung always maximiert

        Elseif @Long(Windowplacement#,4) | $1=@Long(Windowplacement#,4)

            Addstring Fensterposition for The Minimierung is set

        Endif

        Addstring ShowCmd=+@Str $(@Long(Windowplacement#,8))

        If @Long(Windowplacement#,8)=$1

            Addstring status=normal Size

        Elseif @Long(Windowplacement#,8)=$0

            Addstring status=invisible

        Elseif @Long(Windowplacement#,8)=$2

            Addstring status=minimizes

        Elseif @Long(Windowplacement#,8)=$3

            Addstring status=Maximiert

        Elseif @Long(Windowplacement#,8)=$4

            Addstring status=normal Size

        Elseif @Long(Windowplacement#,8)=$5

            Addstring status=latest Fenstergröße

        Elseif @Long(Windowplacement#,8)=$6

            Addstring status=minimizes

        Elseif @Long(Windowplacement#,8)=$7

            Addstring status=minimizes

        Elseif @Long(Windowplacement#,8)=$8

            Addstring status=normal Size

        Elseif @Long(Windowplacement#,8)=$9

            Addstring status=status=normal Size

        Endif

        Addstring X-Koordinate,if Window minimizes is=+@Str $(@Long(Windowplacement#,12))
        Addstring Y-Koordinate,if Window minimizes is=+@Str $(@Long(Windowplacement#,16))
        Addstring X-Koordinate,if Window maximiert is=+@Str $(@Long(Windowplacement#,20))
        Addstring Y-Koordinate,if Window maximiert is=+@Str $(@Long(Windowplacement#,24))
        Addstring X-Koordinate supra left, if Window in Normalzustand is=+@Str $(@Long(Windowplacement#,28))
        Addstring Y-Koordinate supra left, if Window in Normalzustand is=+@Str $(@Long(Windowplacement#,32))
        Addstring X-Koordinate under right, if Window in Normalzustand is=+@Str $(@Long(Windowplacement#,36))
        Addstring Y-Koordinate under right, if Window in Normalzustand is=+@Str $(@Long(Windowplacement#,40))
        Dispose Windowplacement#
        @Listbox$(status and Positionsinformat,1)
        @Setfocus(Activewindow&)

    Elseif @Getfocus(Setstate&)

        Let Show$=@Input$(number of 0 To 9 prompt:,Fensterstatus settle,1)

        If Show$<>

            @Showwindow(Notepad_handle&,@Val(Show$))
            Clearlist
            Addstring Fensterhandle=+@Str $(Notepad_handle&)
            Dim Windowplacement#,44
            Long Windowplacement#,0=44
            Addstring last API-Error=+@Str $(@Getlasterror())
            Let Fehler&=@Getwindowplacement(Notepad_handle&,Windowplacement#)
            Addstring Return of GetWindowPlacement=+@Str $(Fehler&)
            Addstring last API-Error=+@Str $(@Getlasterror())
            Addstring Fenstererzeugungsflags=+@Str $(@Long(Windowplacement#,4))

            If @Long(Windowplacement#,4) | $2=@Long(Windowplacement#,4)

                Addstring Window becomes with the Erzeugung always maximiert

            Elseif @Long(Windowplacement#,4) | $1=@Long(Windowplacement#,4)

                Addstring Fensterposition for The Minimierung is set

            Endif

            Addstring ShowCmd=+@Str $(@Long(Windowplacement#,8))

            If @Long(Windowplacement#,8)=$1

                Addstring status=normal Size

            Elseif @Long(Windowplacement#,8)=$0

                Addstring status=invisible

            Elseif @Long(Windowplacement#,8)=$2

                Addstring status=minimizes

            Elseif @Long(Windowplacement#,8)=$3

                Addstring status=Maximiert

            Elseif @Long(Windowplacement#,8)=$4

                Addstring status=normal Size

            Elseif @Long(Windowplacement#,8)=$5

                Addstring status=latest Fenstergröße

            Elseif @Long(Windowplacement#,8)=$6

                Addstring status=minimizes

            Elseif @Long(Windowplacement#,8)=$7

                Addstring status=minimizes

            Elseif @Long(Windowplacement#,8)=$8

                Addstring status=normal Size

            Elseif @Long(Windowplacement#,8)=$9

                Addstring status=status=normal Size

            Endif

            Addstring X-Koordinate,if Window minimizes is=+@Str $(@Long(Windowplacement#,12))
            Addstring Y-Koordinate,if Window minimizes is=+@Str $(@Long(Windowplacement#,16))
            Addstring X-Koordinate,if Window maximiert is=+@Str $(@Long(Windowplacement#,20))
            Addstring Y-Koordinate,if Window maximiert is=+@Str $(@Long(Windowplacement#,24))
            Addstring X-Koordinate supra left, if Window in Normalzustand is=+@Str $(@Long(Windowplacement#,28))
            Addstring Y-Koordinate supra left, if Window in Normalzustand is=+@Str $(@Long(Windowplacement#,32))
            Addstring X-Koordinate under right, if Window in Normalzustand is=+@Str $(@Long(Windowplacement#,36))
            Addstring Y-Koordinate under right, if Window in Normalzustand is=+@Str $(@Long(Windowplacement#,40))
            Dispose Windowplacement#
            @Listbox$(status and Positionsinformat,1)
            @Setfocus(Activewindow&)

        Endif

    Endif

Wend

 
07/15/07  
 



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

2.456 Views

Untitledvor 0 min.
Axel Berse11/07/23
ByteAttack11/02/15
Georg Teles08/08/15
RICOSCH10/12/14
More...

Themeninformationen

this Topic has 1 subscriber:

unbekannt (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