Autor Beitrag
110022
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 287

XP SP2
Delphi 7
BeitragVerfasst: Mi 28.11.07 21:16 
ausblenden Delphi-Quelltext
1:
if not  (memo1.lines.text=''then (form4.showmodal) and (PlaySound('default'0, SND_SYNC));					

Diese Fehlermeldung kommt
ausblenden Delphi-Quelltext
1:
[Fehler] Unit1.pas(122): Operator ist auf diesen Operandentyp nicht anwendbar					


wie bearbeite ich das so dass es klappt?
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8548
Erhaltene Danke: 477

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Mi 28.11.07 21:20 
Ups, da fehlen ein paar Grundlagen, was?

So geht das:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
if not (memo1.lines.text=''then 
begin
  form4.showmodal;
  PlaySound('default'0, SND_SYNC);
end;

Allerdings dürfte der Sound erst dann abgespielt werden, wenn die Form wieder geschlossen wird.

_________________
We are, we were and will not be.
Atreyu
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 137


Delphi 7 Enterprise
BeitragVerfasst: Mi 28.11.07 22:40 
Sieht so aus, als willst du eine Fehlermeldung ausgeben. Da würde ich keine Extra Form bauen, sondern nur ShowMessage(); oder MessageDlg() verwenden.