English
Source / code snippets

moving Image Scroll bar

 

CompileMarkSeparation
 {$cleq}
declare inframe1&,inframe2&,pic&,ps&,fle$
DEF createpicstatic(6) control("STATIC",@$(2),$5400010E,@%(3),@%(4),@%(5),@%(6),@%(1),2000, %HInstance)

Proc Inframe

    Parameters In_hd&,In_xp&,In_yp&,In_xs&,In_ys&,In_xr&,In_yr&
    In_hd&=Create("listbox",In_hd&,"",In_xp&,In_yp&,0,0)
    Case In_yr&<In_ys&:In_yr&=If(In_xr&>In_xs&,In_ys&-25,In_ys&-10)
    Sendmessage(In_hd&,416,0,10)
    Sendmessage(In_hd&,404,In_xr&,0)

    Whileloop In_yr&/10

        Addstring(In_hd&,"")

    Wend

    Setwindowpos In_hd&=In_xp&,In_yp&-In_xs&,In_ys&
    In_hd&=Control("STATIC","",1409286400,0,0,If(In_xr&<In_xs&,In_xs&,In_xr&),In _yr&+10,In_hd&,0,%Hinstance,$0)
    Return In_hd&

Endproc

windowstyle ( 512 | 8 | 16 )
window 0,0 - 600,600
fle$:="map.bmp"
mloadbmp fle$
pic&:=Create("hPic",-1,fle$)
Inframe1&=Inframe(%Hwnd,5,5,500,500,%bmpx,%bmpy)
ps&:=createpicstatic(inframe1&,"",0,0,%bmpx,%bmpy)
Sendmessage(ps&,$172,0,pic&)

whilenot %key==2

    waitinput

wend

deleteobject pic&
end
salvo, iF.
 
06/19/05  
 



If one however The Y-Sprungweite the scrollenden Listbox not 10PX having would like - separate Pixelgenau - then this slight-modified code:
CompileMarkSeparation
 {$cleq}
declare inframe1&,inframe2&,pic&,ps&,fle$
DEF createpicstatic(6) control("STATIC",@$(2),$5400010E,@%(3),@%(4),@%(5),@%(6),@%(1),2000, %HInstance)

Proc Inframe

    Parameters In_hd&,In_xp&,In_yp&,In_xs&,In_ys&,In_xr&,In_yr&
    In_hd&=Create("listbox",In_hd&,"",In_xp&,In_yp&,0,0)
    Case In_yr&<In_ys&:In_yr&=If(In_xr&>In_xs&,In_ys&-25,In_ys&-10)
    Sendmessage(In_hd&,416,0,10)
    Sendmessage(In_hd&,404,In_xr&,0)
    sendmessage(In_hd&,416,0,1)

    Whileloop In_yr&

        Addstring(In_hd&,"")

    Wend

    Setwindowpos In_hd&=In_xp&,In_yp&-In_xs&,In_ys&
    In_hd&=Control("STATIC","",1409286400,0,0,If(In_xr&<In_xs&,In_xs&,In_xr&),In _yr&+10,In_hd&,0,%Hinstance,$0)
    Return In_hd&

Endproc

windowstyle ( 512 | 8 | 16 )
window 0,0 - 600,600
fle$:="map.bmp"
mloadbmp fle$
pic&:=Create("hPic",-1,fle$)
Inframe1&=Inframe(%Hwnd,5,5,500,500,%bmpx,%bmpy)
ps&:=createpicstatic(inframe1&,"",0,0,%bmpx,%bmpy)
Sendmessage(ps&,$172,0,pic&)

whilenot %key==2

    waitinput

wend

deleteobject pic&
end
salvo, iF.
 
06/19/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

3.034 Views

Themeninformationen

this Topic has 1 subscriber:

iF (2x)


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