| |
|
|
Manfred Barei | Hi,
have with folgendem Prog. code something Problems and of course läst itself the window not any more over the close Cross terminate. CompileMarkSeparation
proc prgexit
MessageBox("Programm beenden?","Frage:",36)
if %Button = 6
ende& = 1
ASSIGN #1,PrgDir$+"NACHN.BMP"
ASSIGN #2,PrgDir$+"ABS.BMP"
ASSIGN #3,PrgDir$+"EMP.BMP"
ERASE #1
ERASE #2
ERASE #3
endif
SetMenuItem 0
SETFOCUS(%HWND)
endproc
proc anzeige
DECLARE ende&
DECLARE Formular&, Datenbank&
SETTRUECOLOR 1
WINDOWSTYLE 538
window (%MaxX+2),((%MaxY/2)-250)-596,510
GETSYSCOLOR(15)
PopUp "&Datei"
AppendMenu 102,"D&rucken"
Separator
AppendMenu 190,"&Ende"
SetWindowPos %HWnd=((%MaxX/2)-298),((%MaxY/2)-250)-596,510;0
ende&=0
SETFOCUS(%HWND)
whilenot ende&
sleep 100
If @MenuItem(190) or (%Key = 2)
prgexit
ELSEIF GETFOCUS(Formular&)
ELSEIF GETFOCUS(Datenbank&)
endif
ENDWHILE
endproc
display
I need The Whilschleife but with a sleep, it must still possible his, have the too irgentwo once red, find But not any more.
I hope your can help.
Grus from the Heath of Manfred Windows XP Prof. , Profan 8/9 |
|
|
| Zu wenig Wissen ist gefärlich, zu viel auch.(XProfan X4) | Win 10 Pro 64 | Win7 Ultimate 32/64 | AMD FX-8320, 16GB, GeForce GT 630 | | 02/03/05 ▲ |
|
|
|
|
Manfred Barei | Hello again,
Soory, it comes always a Error Message the The Variable PrgDir$ not Declariert is, Please comment. have whom Prog. code from my ongoing Program entnommen and this example forget The Variable To delete.
Grus Manfred |
|
|
| Zu wenig Wissen ist gefärlich, zu viel auch.(XProfan X4) | Win 10 Pro 64 | Win7 Ultimate 32/64 | AMD FX-8320, 16GB, GeForce GT 630 | | 02/03/05 ▲ |
|
|
|
|
Michael Dell | |
|
|
|
Manfred Barei | Hello Michael,
thanks for response, have I but already probiert ( working not).
Grus Manfred |
|
|
| Zu wenig Wissen ist gefärlich, zu viel auch.(XProfan X4) | Win 10 Pro 64 | Win7 Ultimate 32/64 | AMD FX-8320, 16GB, GeForce GT 630 | | 02/03/05 ▲ |
|
|
|
|
CB | Hi, probier time the:
DEF &WM_CLOSE $010 DEF &WM_COMMAND $0111 User Messages &WM_COMMAND,&WM_CLOSE
into Hauptschleife: (only in principle, be in haste):
Whilenot Ende& Sleep 100 Waitinput If %UMessage = &WM_CLOSE Ende& = 1 ElseIf %UMessage = &WM_COMMAND If &ULParam = Formular& . . .
Sincerely, Christian |
|
|
| |
|
|
|
| the You a While-Loop benötigst - with a Sleep - is so hope I only The half-way truth.
Perhaps want You but too only the the program weiterläuft During low which The Hauptroutine The normalen releases Done.
very for Gibts The Thread.pcu
five Lines More and you have the desired Result: CompileMarkSeparation $U thread.pcu = thread.
proc prgexit
MessageBox("Programm beenden?","Frage:",36)
if %Button = 6
ende& = 1
ASSIGN #1,PrgDir$+"NACHN.BMP"
ASSIGN #2,PrgDir$+"ABS.BMP"
ASSIGN #3,PrgDir$+"EMP.BMP"
ERASE #1
ERASE #2
ERASE #3
endif
SetMenuItem 0
SETFOCUS(%HWND)
endproc
proc anzeige
DECLARE ende&
DECLARE Formular&, Datenbank&
SETTRUECOLOR 1
WINDOWSTYLE 538
window (%MaxX+2),((%MaxY/2)-250)-596,510
PopUp "&Datei"
AppendMenu 102,"D&rucken"
Separator
AppendMenu 190,"&Ende"
SetWindowPos %HWnd=((%MaxX/2)-298),((%MaxY/2)-250)-596,510;0
ende&=0
SETFOCUS(%HWND)
thread.start 1
whilenot ende&
waitinput
If @MenuItem(190) or (%Key = 2)
prgexit
ELSEIF GETFOCUS(Formular&)
ELSEIF GETFOCUS(Datenbank&)
endif
ENDWHILE
thread.stop 1
endproc
proc thread.do
settext %hwnd,time$(0)+"."+time$(1)
endproc
='./../../references-fonction/XProfan/display/'>display
salvo, iF |
|
|
| |
|
|
|
Manfred Barei | Hi,
To Christian: the Waitinput can I in this Loop not use, therefore sleep.
To IF: No, I custom The Loop with a sleep since the Loop with a Waitinput not functions. tappt im dunkeln lodging-house keeper in between always time again quizzed.
The Loop becomes After pressing one Buttons leave and verzweigt in a Unterschleife. The Hauptschleife becomes but over ands over again time quizzed.
circa now not The entire CPU-Auslastung this Program zuzuteilen the sleep.
I hope I have me verständlich framed.
Grus Manfred |
|
|
| Zu wenig Wissen ist gefärlich, zu viel auch.(XProfan X4) | Win 10 Pro 64 | Win7 Ultimate 32/64 | AMD FX-8320, 16GB, GeForce GT 630 | | 02/03/05 ▲ |
|
|
|
|
| look you still again my Source on - the power very the what You want. Look you too times the Help to Thread.Pcu on. You must still not the Hauptprogramm with the Gewurstel keep busy - particularly if you still eigendlich the Waitinput need. For this is the procedure Thread.Do still there.
i think if you one bisl umdenkst is the very the what You need.
salvo, iF |
|
|
| |
|
|
|
Rolf Koch | Hi Manfred,
jawohl, IFs Thread.pcu is really what You benötigst! several Timer settle, different Topics on the side inquire and Edit (dato were it still up to 5, IF?) and this with 0% Prozessorauslastung in the Hauptprogramm. Vorallem The Integration is mind. just as simply as if one a Timer setting.
Rolf (Hatschi ) |
|
|
| |
|
|
|
Jörg Sellmeyer | Hello Manfred, so should it too with your code functions: CompileMarkSeparation
proc prgexit
MessageBox("Programm beenden?","Frage:",36)
if %Button = 6
ende& = 1
KillTimerTimer freigeben
ASSIGN #1,PrgDir$+"NACHN.BMP"
ASSIGN #2,PrgDir$+"ABS.BMP"
ASSIGN #3,PrgDir$+"EMP.BMP"
ERASE #1
ERASE #2
ERASE #3
endif
SetMenuItem 0
SETFOCUS(%HWND)
endproc
proc anzeige
DECLARE ende&
DECLARE Formular&, Datenbank&
SETTRUECOLOR 1
WINDOWSTYLE 538
window (%MaxX+2),((%MaxY/2)-250)-596,510
GETSYSCOLOR(15)
PopUp "&Datei"
AppendMenu 102,"D&rucken"
Separator
AppendMenu 190,"&Ende"
SetWindowPos %HWnd=((%MaxX/2)-298),((%MaxY/2)-250)-596,510;0
ende&=0
SETFOCUS(%HWND)
SetTimer 1je kleiner der Timer, desto besser reagiert das Programm
ob 1 oder 100 hat auf die CPUauslastung ca. 5%-10% Auswirkung
whilenot ende&
CaseNot %wmtimer:WaitiInput
If @MenuItem(190) or (%Key = 2)
prgexit
ELSEIF GETFOCUS(Formular&)
ELSEIF GETFOCUS(Datenbank&)
endif
ENDWHILE
endproc
/../references-fonction/XProfan/display/'>display
Greeting Jörg |
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 02/03/05 ▲ |
|
|
|