| |
|
|
 Alfred Wagner | Hello Profaner The following trouble
first the code
$P+ SET(ERRORLEVEL,0) DEF GETSYSCOLOR(1) !USER32,GetSysColor DECLARE Ende&,Übernehmen&,CHECKBOX1&
PROC Ende_ONCLICK GETMESSAGE If Übernehmen& = 1 @Messagebox(you have whom Übernehmen Button not pressed!,Message,64) Else @Messagebox(you have whom Übernehmen Button pressed!,Message,64) EndIf
ENDE%=1 ENDPROC
PROC Übernehmen_ONCLICK GETMESSAGE ENDPROC
PROC CHECKBOX1_ONCLICK GETMESSAGE ENDPROC
WINDOWSTYLE 31 WINDOWTITLE New Window WINDOW (%maxx/2 - 380/2),(%maxy/2 - 180/2) - 380,180 SET(TRUECOLOR,1) DECLARE ENDE% CLS GETSYSCOLOR(15) USEFONT MS Sans Serif,13,0,0,0,0 SETDIALOGFONT 1
Ende& = CREATE(BUTTON,%HWND,end,0275,0100,0070,0022) Übernehmen& = CREATE(BUTTON,%HWND,Übernehmen,0175,0100,0080,0022) EnableWindow Übernehmen&,0
CHECKBOX1& = CREATE(CHECKBOX,%HWND,CHECKBOX,0021,0034,0227,0015)
SETFOCUS(%HWND) WHILENOT ENDE% WAITINPUT If %KEY=2 ENDE%= 1 ELSEIF %KEY=4
ELSEIF GETFOCUS(Ende&) end Ende_ONCLICK
ELSEIF GETFOCUS(Übernehmen&) BUTTON Übernehmen_ONCLICK ELSEIF GETFOCUS(CHECKBOX1&) CHECKBOX EnableWindow Übernehmen&,1 ENDIF ENDWHILE
has someone a hint whether the terminate Button white whether the Übernehmen Buttonbetätigt been or not.
thanks already time in the vorhinein for your Help
Regards Alfred with family |
|
|
| |
|
|
|
 Rolf Koch | Hi Alfred, first once, would lesbarer, if you here pictured code in lesbare shape bring, code insert, Mark and the Rautebutton over the Eingabefenster here clicking. you have Übernehmen written, these in the Programming not so appropriate, use rather Uebernehmen. I Have here simply ne new Variable installed. becomes the Button klicked, so becomes these Variable on 1 staid and this with terminate quizzed. CompileMarkSeparation $P+
SET("ERRORLEVEL",0)
DEF GETSYSCOLOR(1) !"USER32","GetSysColor"
DECLARE Ende&,Übernehmen&,CHECKBOX1&
Neue Variable
Declare ch_ueber%
PROC Ende_ONCLICK
GETMESSAGE
If ch_ueber% = 0
@Messagebox("Du hast den Übernehmen Button nicht gedrückt!","Meldung",64)
Else
@Messagebox("Du hast den Übernehmen Button gedrückt!","Meldung",64)
EndIf
ENDE%=1
ENDPROC
PROC Übernehmen_ONCLICK
GETMESSAGE
ch_ueber%=1
ENDPROC
PROC CHECKBOX1_ONCLICK
GETMESSAGE
ENDPROC
WINDOWSTYLE 31
WINDOWTITLE "Neues Fenster"
WINDOW (%maxx/2 - 380/2),(%maxy/2 - 180/2) - 380,180
SET("TRUECOLOR",1)
DECLARE ENDE%
CLS GETSYSCOLOR(15)
USEFONT "MS Sans Serif",13,0,0,0,0
SETDIALOGFONT 1
Ende& = CREATE("BUTTON",%HWND,"Ende",0275,0100,0070,0022)
Übernehmen& = CREATE("BUTTON",%HWND,"Übernehmen",0175,0100,0080,0022)
EnableWindow Übernehmen&,0
CHECKBOX1& = CREATE("CHECKBOX",%HWND,"CHECKBOX",0021,0034,0227,0015)
SETFOCUS(%HWND)
WHILENOT ENDE%
WAITINPUT
If %KEY=2
ENDE%= 1
ELSEIF %KEY=4
ELSEIF GETFOCUS(Ende&) Ende
Ende_ONCLICK
ELSEIF GETFOCUS(Übernehmen&) BUTTON
Übernehmen_ONCLICK
ELSEIF GETFOCUS(CHECKBOX1&) CHECKBOX
EnableWindow Übernehmen&,1
ENDIF
< s=s4 href='./../../Function-References/XProfan/endwhile/'>ENDWHILE
|
|
|
| |
|
|
|
 | @Alfred: one observes itself simply whether it pressed watts. If it pressed becomes setting is a arbitrary Variable on a beliebigen worth. These Variable can later abprüfen. 
too Rolfs Tipp the one Codes in Forums with ... CompileMarkSeparation ...ummantelt is likewise gold worth. ;)
Umlaute in Quelltexten find so did i ill.  |
|
|
| |
|
|
|
 Alfred Wagner | thanks Rolf skin there here time one Test with the rautebutton,habs yet not yet so correctly. understands,thanks CompileMarkSeparation $P+
SET("ERRORLEVEL",0)
DEF GETSYSCOLOR(1) !"USER32","GetSysColor"
DECLARE Ende&,Übernehmen&,CHECKBOX1&
Neue Variable
Declare ch_ueber%
PROC Ende_ONCLICK
GETMESSAGE
If ch_ueber% = 0
@Messagebox("Du hast den Übernehmen Button nicht gedrückt!","Meldung",64)
Else
@Messagebox("Du hast den Übernehmen Button gedrückt!","Meldung",64)
EndIf
ENDE%=1
ENDPROC
PROC Übernehmen_ONCLICK
GETMESSAGE
ch_ueber%=1
ENDPROC
PROC CHECKBOX1_ONCLICK
GETMESSAGE
ENDPROC
WINDOWSTYLE 31
WINDOWTITLE "Neues Fenster"
WINDOW (%maxx/2 - 380/2),(%maxy/2 - 180/2) - 380,180
SET("TRUECOLOR",1)
DECLARE ENDE%
CLS GETSYSCOLOR(15)
USEFONT "MS Sans Serif",13,0,0,0,0
SETDIALOGFONT 1
Ende& = CREATE("BUTTON",%HWND,"Ende",0275,0100,0070,0022)
Übernehmen& = CREATE("BUTTON",%HWND,"Übernehmen",0175,0100,0080,0022)
EnableWindow Übernehmen&,0
CHECKBOX1& = CREATE("CHECKBOX",%HWND,"CHECKBOX",0021,0034,0227,0015)
SETFOCUS(%HWND)
WHILENOT ENDE%
WAITINPUT
If %KEY=2
ENDE%= 1
ELSEIF %KEY=4
ELSEIF GETFOCUS(Ende&)Ende
Ende_ONCLICK
ELSEIF GETFOCUS(Übernehmen&)BUTTON
Übernehmen_ONCLICK
ELSEIF GETFOCUS(CHECKBOX1&)CHECKBOX
EnableWindow Übernehmen&,1
ENDIF
< s=s4 href='./../../Function-References/XProfan/endwhile/'>ENDWHILE
hope has worked
another question wieso ought to man not take take in the code ?
Regards Alfred with family |
|
|
| |
|
|
|
 | I Have your Posting time revised - click simply on edit under Your Posting then see You I changed have. |
|
|
| |
|
|
|
 | Umlaute are integrally simply Sonderzeichen, Roland allows these - but recommended are you not.
naturally concerns the no Stringinhalte!
One s$=Hallo here rüber is naturally ok!
One VieleÄpfel&=50 becomes but not recommended.
You can also later time Problems therefore get - z.B. if you The IDE wechselst. according to the in welchem stature You The Textdatei abspeicherst can Umlaute at a single blow others Bytewerte get. the against could moreover lead the the XProfankompiler at a single blow still not any more so clear comes. |
|
|
| |
|
|
|
 Alfred Wagner | thanks you both
once more one Test for next code CompileMarkSeparation have always virtual the quelltext heard between whom clinging of code! but code means beginning and /codeende.
well Yes To one mals understands has,dauerts even a little bit
thanks again
Güße Alfred with family |
|
|
| |
|
|
|
 | clear gladly happen, You can incidentally *reusper* your obiges Posting edit and as an afterthought the code settle - damits not so bad looks.  |
|
|
| |
|
|