English
Forum

Need some help

 

H.Brill
Hi,
I bräuchte something Help. i will one Tourenplan-
Program make and get The Abwicklung
with a TabControl not so there.

in the oberen LV to the Kundenstamm mere. under
in the TabControl should for individual days (Mo - FR)
LVs prepares go. In these should now each
customers übernommen go. so are for each day
different customers drin. Later I will still
one Print out the various. days as well as Delete, move
etc. install.

The problem is, if I a customers in the Kundenstamm
anklicke, a tab-tab auswähle and <Setze>
reinkopieren wants, then attend The customers each
day (tab).

shining only one small Error To his. what have I overlooking ?
CompileMarkSeparation
Declare TabControl&,ende%, hd%, OK%, nz%, sp1%, lade1%, setze%
Declare index1%, tabnr%
Declare Memo1&,Memo2&,Memo3&,lv1&, lv2&, lv3&, lv4&, lv5&, klv&, lvdll&
Declare text1$, Edits$, sfile$
Edits$ = "01111111"
 $I Listview_Funktionen.inc

Proc SpeichereKlv

    Declare x&
    Declare bereich#

    IfNot sfile$ = ""

        x&=GetNeededMemory(klv&,1)
        Dim bereich#,x&
        x&=ListviewToCsv(klv&,bereich#,0,0)
        WriteFileQuick(addr(sfile$),bereich#,0,x&)
        Dispose bereich#

    EndIf

EndProc

Proc LadeKlv

    Declare bytes&
    Declare bereich#
    bytes&=@FileSize(sfile$)

    If bytes& > 0

        Dim bereich#,bytes&
        ReadFileQuick(addr(sfile$),bereich#,0,bytes&)
        CsvToListview(klv&,bereich#,bytes&,8)
        Dispose bereich#

    EndIf

EndProc

lvdll&=usedll("Listview.dll")
hd% = @Create("Dialog",%HWnd,"Tourenplan - Programm von H.Brill",10,10,%MaxX - 100,%MaxY - 100)
nz% = @Create("Button", hd%,  "Neue Zeile",10, 10, 80, 20)
sp1% = @Create("Button", hd%, "Speichern", 10, 40, 80, 20)
lade1% = @Create("Button", hd%, "Laden", 10, 70, 80, 20)
setze% = @Create("Button", hd%, "Setze", 10, 300, 80, 20)
Let klv&=CreateListview(hd%,%hinstance,0,$ffffff,-1,$31)
InsertColumn(klv&, " ", 20, 0)
InsertColumn(klv&, "Kdnr", 50, 0)
InsertColumn(klv&, "Name", 150, 0)
InsertColumn(klv&, "Wohnort", 150, 0)
InsertColumn(klv&, "Straße", 150, 0)
InsertColumn(klv&, "Telefon", 120, 0)
InsertColumn(klv&, "Verrechn.", 100, 0)
InsertColumn(klv&, "Preiszone", 100, 0)
ShowListview(klv&, 10, 100, 850, 150)
Let TabControl&=Create("TABCTRL",hd%,"Freitag",10,380,900,400)
InsertTab(TabControl&,0,"Donnerstag")
InsertTab(TabControl&,0,"Mittwoch")
InsertTab(TabControl&,0,"Dienstag")
InsertTab(TabControl&,0,"Montag")
Let lv1&=CreateListview(TabControl&,%hinstance,0,$ffffff,-1,$31)
InsertColumn(lv1&, " ", 20, 0)
InsertColumn(lv1&, "Kdnr", 50, 0)
InsertColumn(lv1&, "Name", 150, 0)
InsertColumn(lv1&, "Wohnort", 150, 0)
InsertColumn(lv1&, "Straße", 150, 0)
InsertColumn(lv1&, "Telefon", 120, 0)
InsertColumn(lv1&, "Verrechn.", 100, 0)
InsertColumn(lv1&, "Preiszone", 100, 0)
ShowListview(lv1&, 10, 40, 800, 200)
Let lv2&=CreateListview(TabControl&,%hinstance,0,$ffffff,-1,$31)
InsertColumn(lv2&, " ", 20, 0)
InsertColumn(lv2&, "Kdnr", 50, 0)
InsertColumn(lv2&, "Name", 150, 0)
InsertColumn(lv2&, "Wohnort", 150, 0)
InsertColumn(lv2&, "Straße", 150, 0)
InsertColumn(lv2&, "Telefon", 120, 0)
InsertColumn(lv2&, "Verrechn.", 100, 0)
InsertColumn(lv2&, "Preiszone", 100, 0)
ShowListview(lv2&, 10, 40, 800, 200)
Let lv3&=CreateListview(TabControl&,%hinstance,0,$ffffff,-1,$31)
InsertColumn(lv3&, " ", 20, 0)
InsertColumn(lv3&, "Kdnr", 50, 0)
InsertColumn(lv3&, "Name", 150, 0)
InsertColumn(lv3&, "Wohnort", 150, 0)
InsertColumn(lv3&, "Straße", 150, 0)
InsertColumn(lv3&, "Telefon", 120, 0)
InsertColumn(lv3&, "Verrechn.", 100, 0)
InsertColumn(lv3&, "Preiszone", 100, 0)
ShowListview(lv3&, 10, 40, 800, 200)
Let lv4&=CreateListview(TabControl&,%hinstance,0,$ffffff,-1,$31)
InsertColumn(lv4&, " ", 20, 0)
InsertColumn(lv4&, "Kdnr", 50, 0)
InsertColumn(lv4&, "Name", 150, 0)
InsertColumn(lv4&, "Wohnort", 150, 0)
InsertColumn(lv4&, "Straße", 150, 0)
InsertColumn(lv4&, "Telefon", 120, 0)
InsertColumn(lv4&, "Verrechn.", 100, 0)
InsertColumn(lv4&, "Preiszone", 100, 0)
ShowListview(lv4&, 10, 40, 800, 200)
Let lv5&=CreateListview(TabControl&,%hinstance,0,$ffffff,-1,$31)
InsertColumn(lv5&, " ", 20, 0)
InsertColumn(lv5&, "Kdnr", 50, 0)
InsertColumn(lv5&, "Name", 150, 0)
InsertColumn(lv5&, "Wohnort", 150, 0)
InsertColumn(lv5&, "Straße", 150, 0)
InsertColumn(lv5&, "Telefon", 120, 0)
InsertColumn(lv5&, "Verrechn.", 100, 0)
InsertColumn(lv5&, "Preiszone", 100, 0)
ShowListview(lv5&, 10, 40, 800, 200)
InitMessages(hd%)
SelectColumnEdits(klv&, addr(Edits$))
EnableEdits(klv&, 1)
EnableEdits(lv1&, 1)
EnableEdits(lv2&, 1)
EnableEdits(lv3&, 1)
EnableEdits(lv4&, 1)
EnableEdits(lv5&, 1)

If Equ(%key,2)

    Let ende%=1

EndIf

Clear OK%

WhileNot Ok%

    WaitInput

    If @GetFocus(nz%)

        SetItem klv&, "", "", "", "", "", "", "", ""

    ElseIf @GetFocus(sp1%)

        sfile$ = @SaveFile$("Datei speichern", "TourNr.csv")
        SpeichereKlv

    ElseIf @GetFocus(lade1%)

        sfile$ = @LoadFile$("Datei laden", "TourNr|*.csv")
        LadeKlv

    ElseIf @GetFocus(setze%)

        index1% = GetSelectedLine(klv&)
        tabnr% = @GetActiveTab(TabControl&)
        Hier soll abhängig vom Reiter des Tabcontrols
        in das entsprechende Listview reinkopiert werden
        Case @Equ(tabnr%, 0) : CopyLineTo(klv&, lv1&, index1%, 0)
        Case @Equ(tabnr%, 1) : CopyLineTo(klv&, lv2&, index1%, 0)
        Case @Equ(tabnr%, 2) : CopyLineTo(klv&, lv3&, index1%, 0)
        Case @Equ(tabnr%, 3) : CopyLineTo(klv&, lv4&, index1%, 0)
        Case @Equ(tabnr%, 4) : CopyLineTo(klv&, lv5&, index1%, 0)

    EndIf

    If @Equ(%key, 2)

        Ok% = 1

    EndIf

Wend

@DestroyWindow(hD%)
CloseMessages(hd%)
End
 
Benutze XPROFAN X3 + FREEPROFAN
Wir sind die XProfaner.
Sie werden von uns assimiliert.
Widerstand ist zwecklos!
Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.

Was die Borg können, können wir schon lange.
01/20/05  
 



now - you have yet many others Problemchen in Your Source - but so ists one bisl rather (getfocus staid).
CompileMarkSeparation
Declare TabControl&,ende%, hd%, OK%, nz%, sp1%, lade1%, setze%
Declare index1%, tabnr%
Declare Memo1&,Memo2&,Memo3&,lv1&, lv2&, lv3&, lv4&, lv5&, klv&, lvdll&
Declare text1$, Edits$, sfile$
Edits$ = "01111111"
 $I Listview_Funktionen.inc

Proc SpeichereKlv

    Declare x&
    Declare bereich#

    IfNot sfile$ = ""

        x&=GetNeededMemory(klv&,1)
        Dim bereich#,x&
        x&=ListviewToCsv(klv&,bereich#,0,0)
        WriteFileQuick(addr(sfile$),bereich#,0,x&)
        Dispose bereich#

    EndIf

EndProc

Proc LadeKlv

    Declare bytes&
    Declare bereich#
    bytes&=@FileSize(sfile$)

    If bytes& > 0

        Dim bereich#,bytes&
        ReadFileQuick(addr(sfile$),bereich#,0,bytes&)
        CsvToListview(klv&,bereich#,bytes&,8)
        Dispose bereich#

    EndIf

EndProc

lvdll&=usedll("Listview.dll")
hd% = @Create("Dialog",%HWnd,"Tourenplan - Programm von H.Brill",10,10,%MaxX - 100,%MaxY - 100)
nz% = @Create("Button", hd%,  "Neue Zeile",10, 10, 80, 20)
sp1% = @Create("Button", hd%, "Speichern", 10, 40, 80, 20)
lade1% = @Create("Button", hd%, "Laden", 10, 70, 80, 20)
setze% = @Create("Button", hd%, "Setze", 10, 300, 80, 20)
Let klv&=CreateListview(hd%,%hinstance,0,$ffffff,-1,$31)
InsertColumn(klv&, " ", 20, 0)
InsertColumn(klv&, "Kdnr", 50, 0)
InsertColumn(klv&, "Name", 150, 0)
InsertColumn(klv&, "Wohnort", 150, 0)
InsertColumn(klv&, "Straße", 150, 0)
InsertColumn(klv&, "Telefon", 120, 0)
InsertColumn(klv&, "Verrechn.", 100, 0)
InsertColumn(klv&, "Preiszone", 100, 0)
ShowListview(klv&, 10, 100, 850, 150)
Let TabControl&=Create("TABCTRL",hd%,"Freitag",10,380,900,400)
InsertTab(TabControl&,0,"Donnerstag")
InsertTab(TabControl&,0,"Mittwoch")
InsertTab(TabControl&,0,"Dienstag")
InsertTab(TabControl&,0,"Montag")
Let lv1&=CreateListview(TabControl&,%hinstance,0,$ffffff,-1,$31)
InsertColumn(lv1&, " ", 20, 0)
InsertColumn(lv1&, "Kdnr", 50, 0)
InsertColumn(lv1&, "Name", 150, 0)
InsertColumn(lv1&, "Wohnort", 150, 0)
InsertColumn(lv1&, "Straße", 150, 0)
InsertColumn(lv1&, "Telefon", 120, 0)
InsertColumn(lv1&, "Verrechn.", 100, 0)
InsertColumn(lv1&, "Preiszone", 100, 0)
ShowListview(lv1&, 10, 40, 800, 200)
Let lv2&=CreateListview(TabControl&,%hinstance,0,$ffffff,-1,$31)
InsertColumn(lv2&, " ", 20, 0)
InsertColumn(lv2&, "Kdnr", 50, 0)
InsertColumn(lv2&, "Name", 150, 0)
InsertColumn(lv2&, "Wohnort", 150, 0)
InsertColumn(lv2&, "Straße", 150, 0)
InsertColumn(lv2&, "Telefon", 120, 0)
InsertColumn(lv2&, "Verrechn.", 100, 0)
InsertColumn(lv2&, "Preiszone", 100, 0)
ShowListview(lv2&, 10, 40, 800, 200)
Let lv3&=CreateListview(TabControl&,%hinstance,0,$ffffff,-1,$31)
InsertColumn(lv3&, " ", 20, 0)
InsertColumn(lv3&, "Kdnr", 50, 0)
InsertColumn(lv3&, "Name", 150, 0)
InsertColumn(lv3&, "Wohnort", 150, 0)
InsertColumn(lv3&, "Straße", 150, 0)
InsertColumn(lv3&, "Telefon", 120, 0)
InsertColumn(lv3&, "Verrechn.", 100, 0)
InsertColumn(lv3&, "Preiszone", 100, 0)
ShowListview(lv3&, 10, 40, 800, 200)
Let lv4&=CreateListview(TabControl&,%hinstance,0,$ffffff,-1,$31)
InsertColumn(lv4&, " ", 20, 0)
InsertColumn(lv4&, "Kdnr", 50, 0)
InsertColumn(lv4&, "Name", 150, 0)
InsertColumn(lv4&, "Wohnort", 150, 0)
InsertColumn(lv4&, "Straße", 150, 0)
InsertColumn(lv4&, "Telefon", 120, 0)
InsertColumn(lv4&, "Verrechn.", 100, 0)
InsertColumn(lv4&, "Preiszone", 100, 0)
ShowListview(lv4&, 10, 40, 800, 200)
Let lv5&=CreateListview(TabControl&,%hinstance,0,$ffffff,-1,$31)
InsertColumn(lv5&, " ", 20, 0)
InsertColumn(lv5&, "Kdnr", 50, 0)
InsertColumn(lv5&, "Name", 150, 0)
InsertColumn(lv5&, "Wohnort", 150, 0)
InsertColumn(lv5&, "Straße", 150, 0)
InsertColumn(lv5&, "Telefon", 120, 0)
InsertColumn(lv5&, "Verrechn.", 100, 0)
InsertColumn(lv5&, "Preiszone", 100, 0)
ShowListview(lv5&, 10, 40, 800, 200)
InitMessages(hd%)
SelectColumnEdits(klv&, addr(Edits$))
EnableEdits(klv&, 1)
EnableEdits(lv1&, 1)
EnableEdits(lv2&, 1)
EnableEdits(lv3&, 1)
EnableEdits(lv4&, 1)
EnableEdits(lv5&, 1)

If Equ(%key,2)

    Let ende%=1

EndIf

Clear OK%

WhileNot Ok%

    WaitInput

    If @GetFocus(nz%)

        SetItem klv&, "", "", "", "", "", "", "", ""
        setfocus (%hwnd)

    ElseIf @GetFocus(sp1%)

        sfile$ = @SaveFile$("Datei speichern", "TourNr.csv")
        SpeichereKlv
        setfocus (%hwnd)

    ElseIf @GetFocus(lade1%)

        sfile$ = @LoadFile$("Datei laden", "TourNr|*.csv")
        LadeKlv
        setfocus (%hwnd)

    ElseIf @GetFocus(setze%)

        index1% = GetSelectedLine(klv&)
        tabnr% = @GetActiveTab(TabControl&)
        Hier soll abhängig vom Reiter des Tabcontrols
        in das entsprechende Listview reinkopiert werden
        Case @Equ(tabnr%, 0) : CopyLineTo(klv&, lv1&, index1%, 0)
        Case @Equ(tabnr%, 1) : CopyLineTo(klv&, lv2&, index1%, 0)
        Case @Equ(tabnr%, 2) : CopyLineTo(klv&, lv3&, index1%, 0)
        Case @Equ(tabnr%, 3) : CopyLineTo(klv&, lv4&, index1%, 0)
        Case @Equ(tabnr%, 4) : CopyLineTo(klv&, lv5&, index1%, 0)
        setfocus (%hwnd)

    EndIf

    If @Equ(%key, 2)

        Ok% = 1

    EndIf

Wend

@DestroyWindow(hD%)
CloseMessages(hd%)
End

salvo, iF
 
01/20/05  
 




Frank
Abbing
Hello Heinz,

uiui, there runs but some schief.
is too at all no List view.dll-question, separate a general Profanfrage.

however: circa for each tab the Tabcontrols a Own display to obtain, must You naturally your Listviews (and naturally too others Controls) properly one-and Hide!
only one List view - the, which to the actually tab heard - must straight showing. The others must You switch off (Showwindow). Ändert itself the tab (request with Profans TabChanged()), then must the suitable List view eingeblendet go...
 
01/20/05  
 




H.Brill
Hello Frank,
thanks for Tipp.
will be it tonight time try.
 
Benutze XPROFAN X3 + FREEPROFAN
Wir sind die XProfaner.
Sie werden von uns assimiliert.
Widerstand ist zwecklos!
Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.

Was die Borg können, können wir schon lange.
01/21/05  
 




H.Brill
Hi,
have finally my trouble resolved and
can go on.
was only ne Kleinigkeit.

there had I yet ne question :

I have in my different Listviews Check boxes
installed ($4). the Save the individual days goes so far
too. now would like so did i The states the Check boxes
with abspeichern, circa tappt im dunkeln at later loading again just as
for each List view to have.

mandatory I moreover each List view with GetChecked() scour
and a extra File write or does it too plainer ?

Or you can there with whom functions CsvToListview and
ListviewToCsv what make (Verbesserungsvorschlag) ?
 
Benutze XPROFAN X3 + FREEPROFAN
Wir sind die XProfaner.
Sie werden von uns assimiliert.
Widerstand ist zwecklos!
Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.

Was die Borg können, können wir schon lange.
01/22/05  
 




Frank
Abbing
Hello Heinz,

the would naturally the Csv-stature frail make, so others programs these Files not any more correctly. loading could. want I on none drop.
you become for Check boxes-stood a additional File need, evt. could I for two function make, z.B. CheckboxStateToMem() and MemToCheckboxState().
 
01/23/05  
 




H.Brill
Hello Frank,
such two functions wären not so bad.
i think, that too others something like need
can, especially since one then not by hand To foot
separate with two functions works can.

best, that one it with WriteFileQuick and ReadFileQuick
easily on disk Save or. reading can.

can it to you time consider.
 
Benutze XPROFAN X3 + FREEPROFAN
Wir sind die XProfaner.
Sie werden von uns assimiliert.
Widerstand ist zwecklos!
Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.

Was die Borg können, können wir schon lange.
01/23/05  
 




Frank
Abbing
...Grubbelprubbel... Yes, mach I...
 
01/23/05  
 




Frank
Abbing
Hello again,

are the make, the two functions.
 
01/23/05  
 




Frank
Abbing
Nochmal I.

Have The functions ready and you The Beta + Source zugeschickt. Teste time, whether it this is, what You sought have.
 
01/23/05  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

2.767 Views

Untitledvor 0 min.

Themeninformationen



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