English
Forum

1. and 2 Window

 

Detlef
Tussing
Hello all Profaner`n

Have again a question, with the zusammenkopieren of different Programs mach I now 2 Window on. I had but gladly The ListBox in the Window 1, and no weiters Window.
CompileMarkSeparation
1. Fenster
DEF GETSYSCOLOR(1) !USER32,GetSysColor
WINDOWSTYLE 31 47
WINDOWTITLE Test
WINDOW SUB(DIV(%MAXX,2),DIV(740,2)),SUB(DIV(%MAXY,2),DIV(500,2))-660,500
SETTRUECOLOR 1
CLS GETSYSCOLOR(1)15
SETDIALOGFONT 1
2.Fenster im 1. Fenster
dlg% = create(Dialog,%Hwnd,Test2,340,200,250,100)
CBox& = @Control(ComboBox,,$5421034E,10,10,200,200,Dlg%,2000,%hinstance)
End%=@createbutton(Dlg%,Auswahl,80,40,80,32)
Addfiles *.DAT
MoveListToChoice(CBox&

and I too wonder be, desert I gladly what the $5421034E in the 2. Window
means.
I have the complete Program on a others computer copies,
there are The Window at a andern place as by me, depends with the the attitude the Grafikkarte together?
 
Gruß Detlef Tussing
Windows XP, XProfan 10
05/09/07  
 




Jac
de
Lad
around the Listbox in that first Window To contuse müsstest You as übergeordnetes lever %hWnd indicate (or even the window where tappt im dunkeln there should).

$5421034E is the Style. The setting itself from different Values (Attributen) together, näheres moreover in the Help under Control().
 
Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE)
Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP
05/09/07  
 




Rolf
Koch
Hi Detlef,

before we help can, requests we always a kompletten lauffähigen Code post.
question 1: Why take You always Getsyscolor(1)? there's Yes everything Black (by me is Windownormal tuned) according to attitude the Users.
question 2: which Listbox? In Your code see I no Listbox. or mean You The Combobox - under Profan as Choicebox famous.
If the the first Window should, then swaps still simply Dlg% against %hwnd from.
the $xxxxxxx is the Stilbeschreibung the Controls what prepares becomes.
question 3: what mean You with another place? The Coordinates the Mainwindow as well as the Dialoges are eingentlich set with your indicated.
the Mainwindow see I, becomes however Bildschirmmittig reported. means ought to too the Mainwindow on both Rechnern center displayed go.

Nachtrag: the mittige isn't center Have I strain seen, because it go fixe values taken. and these are with different Auflösungen %maxx and %maxy hold differently.
 
05/09/07  
 




Detlef
Tussing
As I said, have from many Prog`s one made.
Since I yet right inexperienced be, wisely I not yet over each commands message.
therefore can some command foolish or wiedersprüchlich his. still
the prog runs.
 
Gruß Detlef Tussing
Windows XP, XProfan 10
05/09/07  
 




Detlef
Tussing
Thanks eurer Help Have I with the whom 2 Windows geschafft,faith too the the Completed: the 2. computer resolved is. How nehm I MAXX and MAXY again out ?
custom I GETSYSCOLOR how circa a blue background to have?
How can I with the Passwortabfrage with ENTER in lieu of the Button OK You can moreover come?
CompileMarkSeparation
 $P+
 $H Windows.ph
Declare box1&, box2&,box3&,box4&,box5&,box6&,text1&,text2&,text3&,text4&,text5&,text6&,datname$,lesen%,name$
Declare relais1$,Relais2$,karte1%,n1%,n2%,Speicher%,ende%,schluss%,datum1$,zeit$
declare von$,bis$,text7&,text0&,Wähle$,cbox&,dlg%,end%,von%,bis%,text01&,n3$,x1%,x2%,xy%
declare exit&,e%,a$
declare edit&,vorgabe$
DEF GETSYSCOLOR(1) !USER32,GetSysColor
WINDOWSTYLE 31 47
WINDOWTITLE Apex Elektronik GmbH Grevenbroich Tel. 02181-24040
WINDOW SUB(DIV(%MAXX,2),DIV(740,2)),SUB(DIV(%MAXY,2),DIV(500,2))-400,150
SETTRUECOLOR 1
CLS GETSYSCOLOR(1)15
SETDIALOGFONT 1
exit& = CreateButton(%HWnd,Ok,150,50,100,35)
vorgabe$ =
edit& = CONTROL(Edit,vorgabe$,$54810020,150,20,100,25,%HWnd,0,%HInstance,$0200)
SetFocus(edit&)

whilenot e%

    WaitInput

    if GetFocus(exit&)

        e% = 1

    endif

wend

A$ = gettext$(edit&)

if a$=qwert

    destroywindow(edit&)
    destroywindow(exit&)
    boxaufbau

else

    end

endif

boxaufbau

proc lesen

    if fileexists(name$) =0

        speichern
        return

    endif

    Assign #1,name$
    reset #1
    input #1,datum1$
    input #1,zeit$
    input #1,relais1$
    input #1,karte1%
    input #1,n2%     0=licht aus
    input #1,von%
    input #1,bis%
    close #1

    if n2% = 1

        n3$=ein

    else

        N3$=aus

    endif

    n1%=relais1$
    von$=von%
    bis$=bis%
    x1%=von%-15 wichtig für die Anzeige in der Choicebox siehe Zeile 36 & 37
    x2%=bis%-5
    @sendmessage(Box1&,$14E,n1%,0,0 )            0,0 = erster eintrag, 1,0 = zweiter eintrag usw.
    @sendmessage(Box2&,$14E,n2%,1,0)
    @sendmessage(Box3&,$14E,x1%,0,0)
    @sendmessage(Box4&,$14E,x2%,0,0)
    settext text5&,Add$(Fahrzeug:  ,name$)
    settext text3&,add$(von: ,von$)
    settext text1&,add$(Tor: ,relais1$)
    settext text2&,add$(Licht : ,n3$)
    settext text4&,add$(bis: ,bis$)

    If n2%=1

        showwindow(text3&,1)
        showwindow(box3&,1)
        showwindow(text4&,1)
        showwindow(box4&,1)
        showwindow(text6&,1)
        showwindow(text7&,1)
        showwindow(speicher%,1)
        showwindow(schluss%,1)

    elseif n2%=0

        showwindow(text3&,0)
        showwindow(box3&,0)
        showwindow(text4&,0)
        showwindow(box4&,0)
        showwindow(text6&,0)
        showwindow(text7&,0)
        showwindow(speicher%,1)
        showwindow(schluss%,1)

    endif

    SETFOCUS(%HWND)

endproc

proc Boxaufbau

    DEF GETSYSCOLOR(1) !USER32,GetSysColor
    WINDOWSTYLE 31 47
    WINDOWTITLE Apex Elektronik GmbH Grevenbroich Tel. 02181-24040
    WINDOW SUB(DIV(%MAXX,2),DIV(700,2)),SUB(DIV(%MAXY,2),DIV(500,2))-700,400
    SETTRUECOLOR 1
    CLS GETSYSCOLOR(1)15
    SETDIALOGFONT 1
    CBox& = @Control(ComboBox,,$5421034E,270,70,100,200,%Hwnd,2000,%hinstance)
    End%=@createbutton(%Hwnd,Auswahl,280,116,80,20)
    Addfiles *.DAT
    MoveListToChoice(CBox&)
    @Sendmessage(CBox&,$14E,0,0)
    name$=@gettext$(cbox&)
    text0&=createtext(%Hwnd,Feuerwehr Grevenbroich,240,30,170,20)
    text1&=Createtext(%Hwnd,Tor:,200,253,50,20)
    showwindow(text1&,0)
    text2&=Createtext(%Hwnd,Licht:,360,253,70,20)
    showwindow(text2&,0)
    text5&=Createtext(%Hwnd,Fahrzeug,35,253,153,20)
    showwindow(text5&,0)
    text3&=Createtext(%Hwnd,von:,200,330,70,20)
    showwindow(text3&,0)
    text4&=Createtext(%Hwnd,bis:  ,360,330,50,20)
    showwindow(text4&,0)
    text6&=createtext(%Hwnd,Hallenbeleuchtung,35,330,130,20)
    showwindow(text6&,0)
    text7&=createtext(%Hwnd,einschalten,520,330,80,20)
    showwindow(text7&,0)
    box1&=Create(choicebox,%Hwnd,0,280,250,50,500)
    showwindow(box1&,0)
    box2&=Create(choicebox,%Hwnd,0,450,250,50,500)
    showwindow(box2&,0)
    box3&=Create(choicebox,%Hwnd,0,280,327,50,500)
    showwindow(box3&,0)
    box4&=Create(choicebox,%Hwnd,0,450,327,50,500)
    showwindow(box4&,0)
    Speicher%=@Create(DefButton,%Hwnd,Speichern und weiter,115,400,155,40)
    showwindow(speicher%,0)
    schluss%=@Create(DefButton,%Hwnd,Speichern und Ende,345,400,155,40)
    showwindow(schluss%,0)
    AddChoice(box1&,0)
    AddChoice(box1&,1) Tor
    AddChoice(box1&,2)
    AddChoice(box1&,3)
    AddChoice(box1&,4)
    AddChoice(box1&,5)
    AddChoice(box1&,6)
    AddChoice(box1&,7)
    AddChoice(box1&,8)
    AddChoice(box1&,9)
    AddChoice(box1&,10)
    AddChoice(box2&,aus)Licht aus
    AddChoice(box2&,ein)Licht ein
    AddChoice(box3&,15)  von
    AddChoice(box3&,16)
    AddChoice(box3&,17)
    AddChoice(box3&,18)
    AddChoice(box3&,19)
    AddChoice(box4&,5)
    AddChoice(box4&,6)  bis
    AddChoice(box4&,7)
    AddChoice(box4&,8)
    AddChoice(box4&,9)
    @sendmessage(Box1&,$14E,n1%,0,0 )            0,0 = erster eintrag, 1,0 = zweiter eintrag usw.
    @sendmessage(Box2&,$14E,n2%,0,0)
    @sendmessage(Box3&,$14E,von$,0,0)
    @sendmessage(Box4&,$14E,bis%,0,0)
    SETFOCUS(%HWND)

    WHILENOT ENDE%

        if %key = 255

        elseif getfocus(box1&)Relais1 Tor

            relais1$=gettext$(box1&)
            settext text1&,add$(Tor: ,relais1$)

        elseif GETFOCUS(box2&)Relais2 Licht

            relais2$=gettext$(box2&)
            settext text2&,add$(Licht : ,gettext$(box2&))

            If relais2$=ein

                showwindow(text3&,1)
                showwindow(box3&,1)
                showwindow(text4&,1)
                showwindow(box4&,1)
                showwindow(text6&,1)
                showwindow(text7&,1)

            elseif GETFOCUS(box2&)Relais2

                showwindow(text3&,0)
                showwindow(box3&,0)
                showwindow(text4&,0)
                showwindow(box4&,0)
                showwindow(text6&,0)
                showwindow(text7&,0)

            endif

        elseif GETFOCUS(box3&)Zeit1

            von$=gettext$(box3&)
            settext text3&,add$(von: ,gettext$(box3&))

        elseif getfocus(box4&)Zeit2

            bis$=gettext$(box4&)
            settext text4&,add$(bis: ,gettext$(box4&))

        elseif getfocus(end%)Fahrzeug

            name$=@gettext$(cbox&)
            lesen
            showwindow(box1&,1)
            showwindow(text1&,1)
            showwindow(box2&,1)
            showwindow(text2&,1)
            showwindow(text5&,1)

        elseif getfocus(speicher%)Speichern und weiter

            speichern

        elseif getfocus(schluss%)Speichern und Ende

            speichern
            ende%=1

        ENDIF

    EndWhile

endproc

close #1
end

Proc Speichern

    if relais2$=ein

        n2%=1

    elseif relais2$=aus

        n2%=0

    endif

    if relais1$<=7

        karte1%=1

    else

        karte1%=2

    endif

    if relais1$ =

        relais1$=0

    endif

    von%=von$
    bis%=bis$
    Assign #1,name$
    rewrite #1
    Print #1,date$(3)
    print #1,time$(0)
    print #1,relais1$
    print #1,karte1%
    print #1,n2%
    print #/span>,of%
    print #1,To%
    close #1

endproc

 
Gruß Detlef Tussing
Windows XP, XProfan 10
05/09/07  
 




Dieter
Zornow
You can also the window in eachone colour dial because You z. B. CLS RGB(255,0,0) write so can you
each Farbnuance take on. If you the window Center want is maxX and maxY already correctly. you have
in your Formel
WINDOW SUB(DIV(%MAXX,2),DIV(740,2)),SUB(DIV(%MAXY,2),DIV(500,2))-660,500
a Error
must hot
WINDOW SUB(DIV(%MAXX,2),DIV(740,2)),SUB(DIV(%MAXY,2),DIV(500,2))-740,500
the value 740 whom You in front dividierst must naturally too then hinten in the Size indicate otherwise comes
the window not The middle, absolute positions give You simply z.B with WINDOW 10,10 - 740,500 on

greetings from Bangkok

Dieter
 
Er ist ein Mann wie ein Baum. Sie nennen ihn Bonsai., Win 7 32 bit und Win 7 64 bit, mit XProfan X2
05/09/07  
 



@Hello Detlef
CompileMarkSeparation
DECLARE wBreit%,wHoch%
wBreit%=640 Breite beliebig einstellbar
wHoch%=480 Höhe beliebig einstellbar - Fenster ist immer in der Mitte des Bildschirmes
WINDOW ((%MaxX/2)-(wBreit%/2)),((%MaxY/2)-(wHoch%/2))-wBreit%,wHoch%
USEBRUSH 1,RGB(0,0,255) das wäre ein helles Blau
RECTANGLE 0,0 - wBreit%,wHoch%
WAITINP

Window can with two Massangaben always Centered showing.
with USEBRUSH and RECTANGLE can You each colour for background take on.
GETSYSCOLOR is on 21 (faith I) Systemfarben set
 
05/09/07  
 




Frank
Abbing
Hehe, CLS is the Horst well straight entfallen...
 
05/09/07  
 



@Frank
For which CLS ? - the Window is with WINDOW x,y-x2,y1 prepares

CLS prepares always one Window supra left with the Size 640X480 - These Size have I in my code only as example indicated. both values can to Gutdünken changed go. I create even my Dialog-Window of these code. only must here with
CompileMarkSeparation
DECLARE wBreit%,wHoch%,win1&
wBreit%=200
wHoch%=150
win1&=CREATE(Dialog,%HWND,, ((%MaxX/2)-(wBreit%/2)),((%MaxY/2)-(wHoch%/2)),wBreit%,wHoch%)pre>

in lieu of the Bindestriches naturally one comma stand. Gelle
 
05/09/07  
 




Detlef
Tussing


thanks, have me very helped.

schaut Please once more in my last inquire mere ,have tappt im dunkeln edited währen your already The Answer given have
 
Gruß Detlef Tussing
Windows XP, XProfan 10
05/09/07  
 



@Detlef

have your Text run. in the equipment see You whom success. with Click on OK bendet itself the program

18 kB
Hochgeladen:05/09/07
Downloadcounter33
Download
 
05/09/07  
 




Detlef
Tussing
not only with klick on the Button separate too with Enter should it exits go
 
Gruß Detlef Tussing
Windows XP, XProfan 10
05/09/07  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

1.494 Views

Untitledvor 0 min.
H.Brill02/15/15
Andre Rohland12/15/12
LuZiF3R03/03/12
Stephie08/14/11

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