English
Source / code snippets

Anpassung Daraufl Fensterskalierung Flimmerfreie

 
Nachtrag: Aktueller and rather is these method:  [...] 




Flimmerfreie Fensterskalierung with Anpassung the daraufliegenden items...

well a problem which almost any XProfan having. If one the finished programs ansieht position one over ands over again solid - not umsonst on skalierbaren Window gespart becomes.

The low-down Profaner becomes more or less moreover moving one not-skalierbares Window to create - where it there with the Creation too vastly Qualitätsunterschiede gives. over ands over again place I solid, that Window with of/ one static Size prepares go, where unregarded becomes the the inside-area according to Windowseinstellung in the Size deviation can. these but one other Topic.

here now my suggestion: One Window (dlg) which itself flicker-free skalieren can - and the daraufliegenden items itself automatically (and immediate) the new Size adjust.
CompileMarkSeparation
 {$cleq}
seterrorlevel 0
 $U thread.pcu = thread.
declare dlg&,dir&,stat&,_dlgw&,_dlgh&,_odlgw&,_odlgh&
decimals 0
dlg&:=createwindow (%desktop,app ,100,100,640,480)
dir&:=createsortedlistbox(dlg&,,0,0,0,0)
stat&:=create(statuswindow,dlg&,Bereit.)
thread.start 1

whilenot (%key==2)

    waitinput

wend

thread.stop 1
end

proc thread.do

    parameters n&

    if n&==1

        _dlgw&:=width(dlg&);_dlgh&:=height(dlg&)

        if ( ( _odlgw&<>_dlgw& ) or ( _odlgh&<>_dlgh& ) )

            _odlgw&:=_dlgw&;_odlgh&:=_dlgh&
            _redrw

        endif

    endif

endproc

proc _redrw

    setwindowpos dir&=0,0 - width(dlg&),(height(dlg&)-height(stat&));0
    setwindowpos stat&=0,0 - 0,0;0

endproc

salvo, iF

483 kB
Kurzbeschreibung: as Exe kompiliertes example
Hochgeladen:03/27/05
Downloadcounter155
Download
 
03/27/05  
 



time ne newer Version with Popupmenu-Support.
CompileMarkSeparation
 {$cleq}
seterrorlevel 0
 $U thread.pcu = thread.
declare dlg&,dir&,stat&,_dlgw&,_dlgh&,_odlgw&,_odlgh&,hMenu&,hwin&
app.init

whilenot (%key==2)

    waitinput

    if (menuitem(100))

        sendmessage(%hwnd,$10,0,0)
        setmenuitem 0

    elseif (menuitem(998))

        enablewindow %hwnd,0
        messagebox About,About,4096
        enablewindow %hwnd,1
        setmenuitem 0

    elseif (menuitem(999))

        enablewindow %hwnd,0
        messagebox Info,Info,4096
        enablewindow %hwnd,1
        setmenuitem 0

    endif

wend

app.kill
end
/* FUNCTIONS */

proc thread.do

    parameters n&

    if (n&==1)

        _dlgw&:=width(dlg&);_dlgh&:=height(dlg&)

        if ( ( _odlgw&<>_dlgw& ) or ( _odlgh&<>_dlgh& ) )

            _odlgw&:=_dlgw&;_odlgh&:=_dlgh&
            _redrw

        endif

    elseif (n&==2)

        insertstring(hwin&,0,time$(0)+.+substr$(time$(1),1,.))

    endif

endproc

proc _redrw

    setwindowpos %hwnd=0,0 - width(dlg&),%CYMenu;0
    setwindowpos hwin&=0,%CYMenu - width(dlg&),(height(dlg&)-height(stat&)-%CYMenu);0
    setwindowpos stat&=0,0 - 0,0;0

endproc

proc app.init

    proc createpmenu

        windowtitle app
        windowstyle 80
        window 0,0-0,0
        showwindow(%Hwnd,0)
        popup Programm
        appendmenu 100,&Beenden
        popup &?
        appendmenu 998,&About
        Separator
        appendmenu 999,&Help
        external(USER32,SetParent,%hwnd,dlg&)

    endproc

    decimals 0
    dlg&:=createwindow (%desktop,app ,100,100,640,480)
    hwin&:=createlistbox(dlg&,,0,0,0,0)
    stat&:=create(statuswindow,dlg&,Bereit.)
    createpmenu
    thread.start 1
    thread.start 2,7

endproc

proc app.kill

    thread.stop 2
    thread.stop
class=s2>1 endproc
Perhaps schaffts Yes someone The PopupMenuunterstützung eleganter einzubetten.

salvo, iF

484 kB
Kurzbeschreibung: as Exe kompiliertes example
Hochgeladen:03/27/05
Downloadcounter143
Download
 
03/27/05  
 



the whole time circa factor Toolbar extended:
CompileMarkSeparation
 {$cleq}
seterrorlevel 0
 $U thread.pcu = thread.
declare dlg&,dir&,stat&,_dlgw&,_dlgh&,_odlgw&,_odlgh&,hMenu&,hwin&,ftps&,ftpp&,ftpm&,_topspc&,hToolbar&,tdlg&
declare fnt1&
app.init

whilenot (%key==2)

    waitinput

    if (menuitem(100))

        sendmessage(%hwnd,$10,0,0)
        setmenuitem 0

    elseif (menuitem(998))

        enablewindow %hwnd,0
        messagebox About,About,4096
        enablewindow %hwnd,1
        setmenuitem 0

    elseif (menuitem(999))

        enablewindow %hwnd,0
        messagebox Info,Info,4096
        enablewindow %hwnd,1
        setmenuitem 0

    elseif (menuitem(2001))

        enablewindow %hwnd,0
        messagebox Info,Info,4096
        enablewindow %hwnd,1
        setmenuitem 0

    endif

wend

app.kill
end
/* FUNCTIONS */

proc thread.do

    parameters n&

    if (n&==1)

        _dlgw&:=width(dlg&);_dlgh&:=height(dlg&)

        if ( ( _odlgw&<>_dlgw& ) or ( _odlgh&<>_dlgh& ) )

            _odlgw&:=_dlgw&;_odlgh&:=_dlgh&
            _redrw

        endif

    elseif (n&==2)

        insertstring(hwin&,0,time$(0)+.+substr$(time$(1),1,.))

    endif

endproc

proc _redrw

    setwindowpos %hwnd=0,0 - width(dlg&),(%CYMenu);0
    _topspc&:=%winbottom-%wintop+48
    setwindowpos tdlg&=0,%CYMenu - %maxx,48;0
    setwindowpos htoolbar&=0,0 - width(tdlg&),height(tdlg&);0

    if ( (height(dlg&)>150) and (width(dlg&)>150) )

        setwindowpos ftpm&=(width(dlg&)-65),((height(dlg&)-height(stat&))-23) - 65,23;0
        setwindowpos ftpp&=(width(dlg&)-130),((height(dlg&)-height(stat&))-23) - 65,23;0

    else

        setwindowpos ftpm&=0,0 - 0,0;0
        setwindowpos ftpp&=0,0 - 0,0;0

    endif

    if (width(dlg&)>150)

        setwindowpos ftps&=(width(dlg&)-130),_topspc& - 130,((height(dlg&)-height(stat&)-_topspc&)-height(ftpm&));0
        setwindowpos hwin&=0,_topspc& - (width(dlg&)-130),(height(dlg&)-height(stat&)-_topspc&);0

    else

        setwindowpos ftps&=0,0-0,0;0
        setwindowpos hwin&=0,_topspc& - (width(dlg&)),(height(dlg&)-height(stat&)-_topspc&);0

    endif

    setwindowpos stat&=0,0 - 0,0;0
    showwindow (ftpm&,0)
    showwindow (ftpp&,0)
    showwindow (ftpm&,1)
    showwindow (ftpp&,1)

endproc

proc app.init

    proc createsubs

        proc createpopupmenu

            popup Programm
            appendmenu 100,&Beenden
            popup &?
            appendmenu 998,&About
            Separator
            appendmenu 999,&Help

        endproc

        proc createtoolbar

            hToolbar& = create(TOOLBAR,tdlg&,0,0,0,2000,-1)
            Toolbar(separator,hToolBar&)
            Toolbar(AddTextButton,hToolBar&,0,2001,Knopf 1,)
            Toolbar(AddTextButton,hToolBar&,0,2002,Knopf 2,)
            Toolbar(AddTextButton,hToolBar&,0,2003,Knopf 3,)
            Toolbar(AddTextButton,hToolBar&,0,2004,Knopf 4,)
            Toolbar(AddTextButton,hToolBar&,0,2005,Knopf 5,)

        endproc

        windowtitle app
        windowstyle 80
        window 0,0-0,0
        createpopupmenu
        createtoolbar
        external(USER32,SetParent,%hwnd,dlg&)

    endproc

    decimals 0
    fnt1&:=createfont(MS Sans Serif,10,0,0,0,0)
    dlg&:=createwindow (%desktop,app ,100,100,640,480)
    hwin&:=createlistbox(dlg&,,0,0,0,0)
    ftps&:=createlistbox(dlg&,,0,0,0,0)
    ftpp&:=createbutton(dlg&,Hinzufügen,0,0,0,0)
    ftpm&:=createbutton(dlg&,Bearbeiten,0,0,0,0)
    windowstyle 80
    tdlg&:=createwindow(dlg&,,0,0,0,0)
    external(USER32,SetParent,tdlg&,dlg&)
    stat&:=create(statuswindow,dlg&,Bereit.)
    setfont hwin&,fnt1&
    setfont ftps&,fnt1&
    setfont ftpp&,fnt1&
    setfont ftpm&,fnt1&
    createsubs
    thread.start 1
    thread.start 2,7

endproc

proc app.kill

    thread.stop 2
    thread.stop 1
  
lass=s4 href='./../../Function-References/XProfan/deleteobject/'>deleteobject fnt1& endproc

485 kB
Kurzbeschreibung: as Exe kompiliertes example
Hochgeladen:03/27/05
Downloadcounter173
Download
 
03/27/05  
 



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

4.727 Views

Untitledvor 0 min.
E.T.12/31/14
Thomas Freier01/20/14
Jörg Sellmeyer11/11/11
Klaus Ernst02/09/11
More...

Themeninformationen

this Topic has 1 subscriber:

iF (3x)


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