| |
|
|
Alfred Wagner | Hello Profaner
first the code: CompileMarkSeparation $P+
SetErrorLevel 0
DEF GETSYSCOLOR(1) !USER32,GetSysColor
DECLARE BUTTON1&,Pfad1$
PROC BUTTON1_ONCLICK
GETMESSAGE
Pfad1$ = @ChooseDir$(Wählen Sie einen Ordner aus:)
If (%Button = 6) Ja Button
MessageBox
(Ok wurde gedrückt,Hinweis !,36)
Elseif (%Button = 7) Nein Button
MessageBox
(Abbrechen wurde gedrückt,Hinweis !,36)
Endif
ENDPROC
WINDOWSTYLE 31
WINDOWTITLE Neues Fenster
WINDOW SUB(DIV(%MAXX,2),DIV(376,2)),SUB(DIV(%MAXY,2),DIV(161,2))-376,161
SETTRUECOLOR 1
DECLARE ENDE%
CLS GETSYSCOLOR(15)
USEFONT MS Sans Serif,13,0,0,0,0
SETDIALOGFONT 1
BUTTON1& = CREATE(BUTTON,%HWND,ChooseDir,0180,0068,0153,0030)
SETFOCUS(%HWND)
WHILENOT ENDE%
WAITINPUT
If @EQU(%KEY,2)
LET ENDE%= 1
ELSEIF @EQU(%KEY,4)
ELSEIF GETFOCUS(BUTTON1&) BUTTON
BUTTON1_ONCLICK
ENDIF
WEND
Problem: white zufälig someone, How I The MessageBox get whether OK or Cancel klicked watts
thanks already time in the vorhinein
Regards Alfred with family |
|
|
| |
|
|
|
Rolf Koch | Hi, not To vergleichen with of/ one Messagebox! means no number, separate the Result counts (here way1$ filled or not) CompileMarkSeparation $P+
SetErrorLevel 0
DEF GETSYSCOLOR(1) !USER32,GetSysColor
DECLARE BUTTON1&,Pfad1$
PROC BUTTON1_ONCLICK
GETMESSAGE
Pfad1$ = @ChooseDir$(Wählen Sie einen Ordner aus:)
If (pfad1$ <> ) Ja Button
MessageBox
(Ok wurde gedrückt,Hinweis !,36)
Else Nein Button
MessageBox
(Abbrechen wurde gedrückt,Hinweis !,36)
Endif
ENDPROC
WINDOWSTYLE 31
WINDOWTITLE Neues Fenster
WINDOW SUB(DIV(%MAXX,2),DIV(376,2)),SUB(DIV(%MAXY,2),DIV(161,2))-376,161
SETTRUECOLOR 1
DECLARE ENDE%
CLS GETSYSCOLOR(15)
USEFONT MS Sans Serif,13,0,0,0,0
SETDIALOGFONT 1
BUTTON1& = CREATE(BUTTON,%HWND,ChooseDir,0180,0068,0153,0030)
SETFOCUS(%HWND)
WHILENOT ENDE%
WAITINPUT
If @EQU(%KEY,2)
LET ENDE%= 1
ELSEIF @EQU(%KEY,4)
ELSEIF GETFOCUS(BUTTON1&) BUTTON
BUTTON1_ONCLICK
ENDIF
WEND
|
|
|
| |
|
|
|
ReinerKlaas | Hi, see Profan Help to MessageBox:
@MessageBox(s1,s2,n)
s1 : String - Meldungstext
s2 : String - Headline
n : Integer - manner the MessageBox
Result - Integer: pressed button
values for BUTTONS (n):
1 - OK Cancel (~MB_OKCANCEL)
The in a MessageBox or one the vordefinierten dialogs squeezed button:
1 - OK 2 -Cancel (Cancel) 3 -Cancel (miscarriage) 4 -repeat 5 -ignore 6 -Yes 7 -No |
|
|
| Gruß Reiner
XProfan 10.0a , Windows XP/Vista32 | 11/09/06 ▲ |
|
|
|
|
Alfred Wagner | Jau Rolf thanks
particularly for in detail Description.
Quote: not To vergleichen with of/ one Messagebox! means no number, separate the Result counts (here way1$ filled or not)
Have well whom woods not sheer trees seen
Hi Reiner thanks for Info to Help!
but I faith without Rolfs (Rocs) code had I not hingekriegt. CompileMarkSeparation Perhaps could one something like along into The Help with install? particularly with of/ one short Description, If (way1$ <> ) Yes Button ( <> ) the for example understand I do not?
Regards Alfred with family |
|
|
| |
|
|
|
| [quote:d00d283087]with vordefinierten Dialogen becomes either 1 for OK or 2 for Cancel zurückgegeben.[/quote:d00d283087] ditto from the Profan-Help
CASE %Button = 1 : OK watts pressed CASE %Button = 2 : Cancel watts pressed |
|
|
| |
|
|
|
Rolf Koch | @Alfred:
If (way1$ <> ) Yes Button ( <> ) the for example understand I do not?
integrally simply: becomes the Yes Button clicked, so becomes your chosen Variable (here way1$) with the selected directory equips. How You see can is too always some directory with appeal the Dialoges markiert. means if you Yes click would have You to that example in the way1$ CROFAN here means would The If (way1$<>) grab, since the Variable not empty (). means greater small empty! otherwise would the ELSE grab, because it Yes not empty and way1$ with your electoral equips is. Horst has naturally too right, but I have always these method with Variablenabfragen bevorzugt with Choosedir, there one Yes anyhow with the Strings operates. |
|
|
| |
|
|
|
Alfred Wagner | thanks you both
<> this is larger or small and empty
again what learnt
well the it the community gives
Regards Alfred with family |
|
|
| |
|
|