English
Forum

Display in the Mainwindow

 

Lars
Gallasch
Hello

i will the The Inputs in the dialog then in the Hauptfensterangezeigt go, I these Search and seichern can. If I but the sprigs eingebe bekomm I only Fehlermeldungen.What do I do there wrong.
greeting Lars
CompileMarkSeparation
proc Eingabe

    declare hFont&
    declare _ende%
    declare _dlg%
    declare Name%
    declare Strasse%
    declare PLZ%
    declare Ort%
    declare Dat%
    declare PARK%
    declare ABL%
    declare VOB%
    declare BEM%
    declare ENDE%
    declare BOK%
    hFont& = create("Font", "ARIAL",14,0,0,0,0)
    setdialogfont hFont&
    _dlg% = createdialog(%hWnd, "Eingabe Kunde", 180, 100, 886, 608)
    Name% = create("text", _dlg%, "Name", 32, 16, 128, 32)
    create("edit", _dlg%, "", 32, 48, 376, 40)
    Strasse% = create("text", _dlg%, "Strasse", 32, 112, 128, 32)
    create("edit", _dlg%, "", 32, 144, 376, 40)
    PLZ% = create("text", _dlg%, "Postleitzahl", 32, 208, 128, 32)
    create("edit", _dlg%, "", 32, 240, 376, 40)
    Ort% = create("text", _dlg%, "Ort", 32, 312, 128, 32)
    create("edit", _dlg%, "", 32, 344, 376, 40)
    Dat% = create("dateedit", _dlg%, "Datum", 32, 408, 128, 32)
    PARK% = create("Text", _dlg%, "Parken", 472, 16, 112, 32)
    create("edit", _dlg%, "", 472, 48, 264, 40)
    ABL% = create("text", _dlg%, "Abladen", 32, 472, 128, 32)
    VOB% = create("edit", _dlg%, "Von:      Bis:", 32, 504, 376, 40)
    BEM% = create("text", _dlg%, "Bemerkung", 472, 112, 128, 32)
    create("edit", _dlg%, "", 472, 144, 392, 352)
    BOK% = create("button", _dlg%, "OK", 528, 528, 104, 32)
    ENDE% = create("button", _dlg%, "Abbruch", 656, 528, 112, 32)
    _ende% = 0

    whilenot  _ende%

        waitinput

        if  @equ(%key ,2)

            let _ende% = 1

        elseif @getfocus(ENDE%)

            _ende% = 1

        elseif getfocus(bok%)

            let Zeile$ = @gettext$(Name%, Strasse%,PLZ%,Ort%,Datum%,Abladen%,Bemerkung%)
            let ende% = 1

        endif

    wend

    @destroywindow(_dlg%)

endproc

Proc TextDemo

    Declare Winkel%,Groesse%
    TextColor @RGB(0,0,0), -1
    UseFont "Times New Roman",Groesse%,0,0,0,0
    DrawText 250,180,Zeile$
    Add Winkel%,150

Wend

EndProc

Proc Bildschirm

CLS
_dlg

ENDPROC

=============
Hauptprogramm
=============
DECLARE Ende%,  Zeile$
WindowStyle $21F
Window 0,0-640,480
WindowTitle "Kunden Übersicht"
PopUp "&Datei"
Appendmenu 201,"&Neu"
Appendmenu 202,"&Suchen"
Appendmenu 203,"&Öffnen"
Appendmenu 204,"&Seichern"
Appendmenu 205,"Speichern &als"
Separator
Appendmenu 401,"&Beenden"
PopUp "Hilfe"
Appendmenu 601,"&Info"
Let Zeile$   =  ""
Let Ende%  = 0

WHILENOT Ende%

WAITINPUT

IF MenuItem(201)

    Eingabe

ELSEIF MenuItem(202)

    @createtext(Dlg%,"Geben Sie einen Suchbegriff ein und drücken Sie den Button",30,5,424,16)

ELSEIF MenuItem(203)

    Bildschirm

ELSEIF MenuItem(204)

    Let  Name%  = @SaveFile$("Speichere Datei",
    "Kunden Übersicht(*.prf)|*.prf|Header-Datei (*.ph)|*.ph|Text (*.txt)|*.txt")

ELSEIF MenuItem(401)

    Let Ende% = 1

ELSEIF MenuItem(601)

    MessageBox( "(c) Lars Gallasch 2008","Kundenverzeichnis",48)

ENDIF

='./../../Function-References/XProfan/endwhile/'>ENDWHILE

END
 
XProfan free, Vista
07/26/08  
 




Rolf
Koch
Hi Lars

first The Please Source with [_code][_/code] without _ here List.
Have this for you changed, so the code rather displayed becomes.

date%,unload%,remark% are not declared.
Nachtrag: Have strain seen, that You these not at all in the program
zuordnest only hold in line$ these needed have.
you have The declariert as Bermerkung% and uses for but BEM%
and very the same thing with unload% sounds under VOB% ????
or Dat% is under to that read aufeinmal date% ?????
the can the program Yes not know *lol*
_dlg is the a Proc? can I not find. The missing yet.
I mean this here:
CompileMarkSeparation
or can it his, that You only supra with the dialog something confuses have?
The sounds namely PROC EINGABE.

Desweiteren under not declariert: DLG%,name%
but I see, there make You too a Error, because SAVEFILE needed a STRINGVARIABLE
means
name$=@savefile..... because the Result no number separate a File his should!
I hope, thereafter GEHTS too moreover? because one SAVEFILE reicht not, because so have You only whom String How
CFADNOCHNPFADNAMEDERDATEI.XXX access. for the Save must You then self yet care.

this is hard: @gettext$(name%, Street%,PLZ%,place%,date%,unload%,remark%)
You can per Variable only once gettext take:
CompileMarkSeparation
a$=gettext$(name%)
b$=gettext$(street%) and so moreover

or mach it so:
CompileMarkSeparation
let row$ = @gettext$(name%,)+gettext$( Street%)+gettext$(,PLZ%) ...... u.s.w.

Nachtrag: Uuiuiuiui - this is too krass:
CompileMarkSeparation
name% = create(Text, _dlg%, name, 32, 16, 128, 32)
create(edit, _dlg%, , 32, 48, 376, 40)

You must whom Editfeldern The variables give, because these want You still read!
here get You always only whom Text in the text box back
here would it to that example always name, which in the Result stand would, because How
said is with gettext$(name%) here the Text box always read and these Yes logischerweise
NAME and remaining always NAME ^^
so correctly.:
CompileMarkSeparation
create(Text, _dlg%, name, 32, 16, 128, 32)
Name%=create(edit, _dlg%, , 32, 48, 376, 40)

Nochwas:
supra in the _dlg% benennst You whom Beendenbutton end% and under The Programmendevariable too end%
Nenn rather then The Programmendevariable: progende%
too would I with
elseif getfocus(bok%)
one
end% = 1
settle, so the Dialog-Window again closed becomes.
 
07/26/08  
 




Lars
Gallasch
I thanks you for your speedy Help . be Yes yet in the Anfängerstress. will be The whole thing again Überarbeiten.
 
XProfan free, Vista
07/27/08  
 



@Lars
in the Codetext is a Eingabedialog whom You naturally to Your savour change can. but so functions The thing - later Opportunities are naturally yet open. but first once The Grundzüge rule ;)
CompileMarkSeparation
DECLARE font0%
font0%=CREATE("FONT","ARIAL",16,6,0,0,0)
---------------------------------------------------------------------------------

PROC EINGABE

    DECLARE EE%,eingabe&,back%,save%,zeile%,steig%,txt%
    zeile%=20
    steig%=30
    DECLARE name%,vorname%,strasse%,plz%,ort%
    DECLARE name$,vorname$,strasse$,plz$,ort$
    EE%=0
    eingabe&=CREATE("DIALOG",%hwnd,"Eingabe-Modul",(%MaxX/2-200),(%MaxY/2-200),400,260)
    txt%=CREATE("TEXT",eingabe&,"Name:",10,zeile%,100,20)
    SetFont txt%,font0%
    name%=CREATE("EDIT",eingabe&,name$,110,zeile%,250,20)
    zeile%=zeile%+steig%
    txt%=CREATE("TEXT",eingabe&,"Vorname:",10,zeile%,100,20)
    SetFont txt%,font0%
    vorname%=CREATE("EDIT",eingabe&,vorname$,110,zeile%,250,20)
    zeile%=zeile%+steig%
    txt%=CREATE("TEXT",eingabe&,"Strasse:",10,zeile%,100,20)
    SetFont txt%,font0%
    strasse%=CREATE("EDIT",eingabe&,strasse$,110,zeile%,250,20)
    zeile%=zeile%+steig%
    txt%=CREATE("TEXT",eingabe&,"Postleitzahl:",10,zeile%,100,20)
    SetFont txt%,font0%
    plz%=CREATE("EDIT",eingabe&,plz$,110,zeile%,100,20)
    zeile%=zeile%+steig%
    txt%=CREATE("TEXT",eingabe&,"Wohnort:",10,zeile%,100,20)
    SetFont txt%,font0%
    ort%=CREATE("EDIT",eingabe&,ort$,110,zeile%,250,20)
    zeile%=zeile%+50
    back%=CREATE("BUTTON",eingabe&,"&Abbrechen",10,zeile%,100,25)
    save%=CREATE("BUTTON",eingabe&,"&Speichern",280,zeile%,100,25)
    SetFocus(name%)

    WHILENOT EE%

        IF GetFocus(back%)

            IF CLICKED(back%)

                EE%=1
                DesTroyWindow(eingabe&)
                SetActiveWindow(%Hwnd)

            EndIF

            If GetFocus(save%)

                IF CLICKED(save%)

                    name$=Gettext$(name%)
                    vorname$=Gettext$(vorname%)
                    strasse$=Gettext$(strasse%)
                    plz$=Gettext$(plz%)
                    ort$=Gettext$(ort%)
                    EE%=1
                    DesTroyWindow(eingabe&)
                    SetActiveWindow(%Hwnd)
                    PRINT name$
                    PRINT vorname$
                    PRINT strasse$
                    PRINT plz$
                    PRINT ort$

                ENDIF

            WEND

        EndWhile

    ENDPROC

    --------------------------------------------------------------------------------
    Window 0,0-%MaxX,%MaxY
    EINGABE
    WAITIN
> END

plenty success
 
07/27/08  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

4.516 Views

Untitledvor 0 min.
Peter Max Müller11/13/17
Joerg06/11/16
JR11/27/14
Torben Nissen02/04/13
More...

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