Autor Beitrag
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6393
Erhaltene Danke: 147

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Di 31.08.04 12:11 
Hi Leute,

also das ist schon ein bisschen merkwürdig:
Ich benutze ein DBGrid in dem hinterlegt ist, wo die PDFs abgelegt sind. Das OCX ist im gleichen Fenster. Wenn ich eine Zeile aus dem Grid auswähle soll das PDF-Dokument angezeigt werden. Das funktioniert auch (LoadFile).
Das Problem ist, dass ich danach nur noch einmal das Grid anklicken kann, um das nächste Dokument anzuzeigen. Dann ist feierabend. Egal wohin ich im Grid klicke, nichts passiert.

Habe natürlich schon einiges ausprobiert:
Wenn ich nach dem LoadFile des OCXs den Focus auf die pdf-Komponente setze, geht es weiter. Ist nur blöd, wenn ich mit der Tastatur arbeiten möchte. Außerdem scheint es Probleme zu geben, wenn ich im Grid scrollen muss.
Mache ich ein ShowMessage nachdem das LoadFile fertig ist klappt alles auch ganz wunderbar. Aber auch das ist schon ganz schön nervig.
Ein SetFocus beim Grid bringt nichts.

Von der Windows-Version ist es nicht abhängig. Das passiert von W98 bis XP-Pro.

Hat jemand ne Idee, wo das Problem steckt (außer zwischen Sitzlehne und Monitor)?

Gruß, Peter


Zuletzt bearbeitet von jasocul am Do 02.09.04 08:45, insgesamt 1-mal bearbeitet
UGrohne
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Veteran
Beiträge: 5502
Erhaltene Danke: 220

Windows 8 , Server 2012
D7 Pro, VS.NET 2012 (C#)
BeitragVerfasst: Di 31.08.04 13:48 
Poste mal ein bisschen von Deinem Code, vielleicht kann man Dir dann besser helfen
Böser Borstel
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 154



BeitragVerfasst: Di 31.08.04 14:14 
pdf(ocx).src
jasocul Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6393
Erhaltene Danke: 147

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Di 31.08.04 14:30 
Wie gewünscht ein bisschen Source :

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
procedure TdtmAuftragsPosition.dtsZeugnisseDataChange(Sender: TObject; Field: TField);
var
  Datei : String;
begin
  Datei := qryZeugnisse.FieldByName('az_pfad').AsString + 
           qryZeugnisse.FieldByName('az_bildname').AsString +
           qryZeugnisse.FieldByName('az_bildtyp').AsString;
  if Datei <> frmAuftragsabwicklung.pdf.src then begin
    if frmAuftragsabwicklung.pdf.LoadFile(Datei) then begin
      frmAuftragsabwicklung.pdf.SetFocus;
    end;
  end;
end;


Sorry, hätte ich auch gleich machen können :oops: .

Gruß, Peter

Moderiert von user profile iconUGrohne: Delphi-Tags hinzugefügt.
jasocul Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6393
Erhaltene Danke: 147

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Di 31.08.04 14:45 
Böser Borstel hat folgendes geschrieben:
pdf(ocx).src


Willst Du die Sourcen vom pdf-ocx ??
Wenn Du den Acrobat-Reader hast, musst Du doch nur das ocx importieren.
Oder habe ich Dich jetzt falsch verstanden?
jasocul Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6393
Erhaltene Danke: 147

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Di 14.09.04 16:25 
Hat sich wirklich noch niemand mit dem Problem auseinander gesetzt? Oder sollte es so einfach sein, dass Ihr mich alle für zu blöd haltet :wink: