Autor Beitrag
Marc.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1876
Erhaltene Danke: 129

Win 8.1, Xubuntu 15.10

BeitragVerfasst: So 29.07.07 14:06 
Hallo!
Ich wollte einen SplashScreen als LogIn-Fenster verwenden. Das funktioniert auch einwandfrei, allerdings halte ich das Fenster mit eine While-Schleife offen, welche die
CPU extrem belastet:
 while not (Access) do application.processmessages;
Access ist eine Variable vom Typ Boolean, die true wird, sobald der Login erfolgreich war.

Wie könnte man dieses Problem noch lösen?

grüße, marc
ZeitGeist87
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1593
Erhaltene Danke: 20

Win95-Win10
Delphi 10 Seattle, Rad Studio 2007, Delphi 7 Prof., C++, WSH, Turbo Pascal, PHP, Delphi X2
BeitragVerfasst: So 29.07.07 14:08 
Hi!

Ganz einfach =)

Schau dir das Beispiel an..vor allem die Projekt-Datei :)
Einloggen, um Attachments anzusehen!
_________________
Wer Provokationen, Ironie, Sarkasmus oder Zynismus herauslesen kann soll sie ignorieren um den Inhalt meiner Beiträge ungetrübt erfassen zu können.
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: So 29.07.07 14:20 
Statt ProcessMessages einfach HandleMessages nehmen ;-)

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
Marc. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1876
Erhaltene Danke: 129

Win 8.1, Xubuntu 15.10

BeitragVerfasst: So 29.07.07 14:31 
Danke euch beiden!
Beide Lösungen funktionieren, wobei ich allerdings user profile iconBenBe's vorziehe. ;)

grüße
ZeitGeist87
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1593
Erhaltene Danke: 20

Win95-Win10
Delphi 10 Seattle, Rad Studio 2007, Delphi 7 Prof., C++, WSH, Turbo Pascal, PHP, Delphi X2
BeitragVerfasst: So 29.07.07 14:39 
user profile iconMarc. hat folgendes geschrieben:
Danke euch beiden!
Beide Lösungen funktionieren, wobei ich allerdings user profile iconBenBe's vorziehe. ;)

grüße


Nur weil du weniger umbauen musst *g*

_________________
Wer Provokationen, Ironie, Sarkasmus oder Zynismus herauslesen kann soll sie ignorieren um den Inhalt meiner Beiträge ungetrübt erfassen zu können.
Biergeneral
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 35

WIN XP
Delphi 7 Ent., Delphi 2007 Ent., C/C++ (Eclipse)
BeitragVerfasst: So 29.07.07 17:17 
Also irgendwie find ich das n bischen hart, das Programm in ner while-schleife "aufzuhängen"
Warum rufst du nicht einfach dein Eingabefenster Modal auf? Das spart dir deutlich "unnütze" Rechenleistung.
Marc. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1876
Erhaltene Danke: 129

Win 8.1, Xubuntu 15.10

BeitragVerfasst: So 29.07.07 17:50 
user profile iconBiergeneral hat folgendes geschrieben:
Also irgendwie find ich das n bischen hart, das Programm in ner while-schleife "aufzuhängen"
Warum rufst du nicht einfach dein Eingabefenster Modal auf? Das spart dir deutlich "unnütze" Rechenleistung.

Ich verbrauche mit dieser Methode nicht mehr und nicht weniger Rechenleistung, sofern mich mein TaskManager nicht belügt! ;)


Zuletzt bearbeitet von Marc. am So 29.07.07 17:54, insgesamt 1-mal bearbeitet
ZeitGeist87
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1593
Erhaltene Danke: 20

Win95-Win10
Delphi 10 Seattle, Rad Studio 2007, Delphi 7 Prof., C++, WSH, Turbo Pascal, PHP, Delphi X2
BeitragVerfasst: So 29.07.07 17:53 
Find so ne While-Schleife auch blöd :)

Musst einmal nen Fehler machen und schon wird sie nie wahr..endlos...

_________________
Wer Provokationen, Ironie, Sarkasmus oder Zynismus herauslesen kann soll sie ignorieren um den Inhalt meiner Beiträge ungetrübt erfassen zu können.
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: So 29.07.07 18:48 
TForm.ShowModal macht auch nix anderes, als in ner While-Schleife Application.HandleMessages aufzurufen ... Soviel zum Halbwissen von einigen hier ...

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
ZeitGeist87
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1593
Erhaltene Danke: 20

Win95-Win10
Delphi 10 Seattle, Rad Studio 2007, Delphi 7 Prof., C++, WSH, Turbo Pascal, PHP, Delphi X2
BeitragVerfasst: Mo 30.07.07 11:06 
user profile iconBenBE hat folgendes geschrieben:
TForm.ShowModal macht auch nix anderes, als in ner While-Schleife Application.HandleMessages aufzurufen ... Soviel zum Halbwissen von einigen hier ...


Ich sagte, ich find ne while-Schleife blöd.
Das Delphi das so löst, ist klar - da funktioniert es auch
Nur kann es eben vorkommen, dass aus unerklärlichen Umständen eben die Variable, auf die Marc prüft niemals true wird und somit kommt sein Programm nicht weiter.

Zum Thema Halbwissen..weißt du alles? :P

_________________
Wer Provokationen, Ironie, Sarkasmus oder Zynismus herauslesen kann soll sie ignorieren um den Inhalt meiner Beiträge ungetrübt erfassen zu können.