English
Opportunities and suggestions

Proposals for future versions

TrackBar

 
- Page 1 -



ByteAttack
So I would me the zusätzliches Control TrackBar wish.
with Create("HTrack.... and Create("VTrack.... as example.



Currently resolve I the something umständlich so:
CompileMarkSeparation
USERMESSAGES 16
 $H windows.ph
 $H commctrl.ph
Declare Ende%,TrackBar&,TrackBar2&,Font&,TB1&,TB2&
WindowStyle 30
WindowTitle "TrackBar"
Window %maxX,0-380,200
Font& = Create("Font","Verdana",13,0,0,0,0)
SetDialogFont Font&
CLS ~GetSysColor(15)
' ############ TrackBar mit Skala
Create("Text",%hwnd,"TrackBar mit Skala",15,10,200,24)
TrackBar& = Control("MSCtls_TrackBar32", "", $54010061,10,30,300,35,%hwnd,$4001,%hInstance, 0)
SendMessage(TrackBar&, ~TBM_SETRANGE, 0, MakeLong(0, 100))'Bereich
SendMessage(TrackBar&, ~TBM_SETPOS, 1, 30)'Aktuelle Position
SendMessage(TrackBar&, ~TBM_SETTICFREQ, 10, 0)'Teiler für die Skala
TB1&=Create("Text",%hwnd,"30",320,35,30,25)
SetFont TB1&,Font&
' ############ TrackBar Schmal
Create("Text",%hwnd,"TrackBar Schmal",15,80,200,24)
TrackBar2& = Control("MSCtls_TrackBar32", "", $54010050,10,100,300,25,%hwnd,$4001,%hInstance, 0)
SendMessage(TrackBar2&, ~TBM_SETRANGE, 0, MakeLong(0, 100))'Bereich
SendMessage(TrackBar2&, ~TBM_SETPOS, 1, 30)'Aktuelle Position
TB2&=Create("Text",%hwnd,"30",320,105,30,25)
SetFont TB2&,Font&
SetWindowPos %hwnd=(%maxX/2-190),(%maxY/2-100)-380,200;0

WhileNot ende%

    WaitInput
    Case %Umessage=16:end
    SetText TB1&,Str$(SendMessage(TrackBar&, ~TBM_GETPOS, 0, 0))
    SetText TB2&,Str$(SendMessage(TrackBar2&, ~TBM_GETPOS, 0, 0))

EndWhile


13 kB
Hochgeladen:08/28/15
Downloadcounter186
Download
 
XProfan X3
Website:  [...] 
Facebook:  [...] 
08/28/15  
 



« this Posting watts as Solution marked. »


Jörg
Sellmeyer
you mean something like?
CompileMarkSeparation
Declare ende%
ende% = 1

If ende% =ende%-1

    ende% = 1
    End'e

E
a>
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
08/28/15  
 




Jörg
Sellmeyer
something less umständlich would it by then, if You you a procedure save (z. B. in a Include), The You then simply Call can:
CompileMarkSeparation
USERMESSAGES 16
 $H windows.ph
 $H commctrl.ph
Declare TrackBar&,Font&
WindowStyle 30
WindowTitle "TrackBar"
Window 380,200
Font& = Create("Font","Verdana",13,0,0,0,0)
SetDialogFont Font&
CLS ~GetSysColor(15)

Proc NewTrackbar

    Parameters hwnd&,X%,Y%,B%,H%,Bereich%,Pos&,Freq&',Stil&
    Declare TB&
    TB& = Control("MSCtls_TrackBar32", "", $54010061,X%,Y%,B%,H%,hwnd&,$4001,%hInstance, 0)
    SendMessage(TB&, ~TBM_SETRANGE, 0, MakeLong(0, Bereich%))'Bereich
    SendMessage(TB&, ~TBM_SETPOS, 1, Pos&)'Aktuelle Position
    SendMessage(TB&, ~TBM_SETTICFREQ, Freq&, 0)'Teiler für die Skala

EndProc

TrackBar& = NewTrackbar(%hwnd,10,10,300,35,200,50,10)
SetFont TrackBar&,Font&

While 1

    WaitInput
    Case %Umessage = 16:Break

Wend


so minimizes the future Schreibarbeit on very a row.
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
08/28/15  
 




ByteAttack
already clear, was indeed only an example-code.

Please with the Quelltexten IMMER The Variable end% using.
( the bring David on The palm tree )
 
XProfan X3
Website:  [...] 
Facebook:  [...] 
08/28/15  
 



 
08/28/15  
 




Jörg
Sellmeyer
you mean something like?
CompileMarkSeparation
Declare ende%
ende% = 1

If ende% =ende%-1

    ende% = 1
    End'e

E
a>
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
08/28/15  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

5.274 Views

Themeninformationen

this Topic has 3 subscriber:

ByteAttack (2x)
Jörg Sellmeyer (2x)
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